Smooth line drawing in a view controller