Animate a change with NSTextAlignment of UITextField using Swift
问题 I am curious if it is possible to animate a change in a UITextField's text alignment. Basically I have a UITextField that's alignment is normally set to center, and I want it to animate over to the left when the user starts editing. Here is the code that I've tried within the UITextField Delegate Methods: func textFieldDidBeginEditing(textField: UITextField) { UIView.animateWithDuration(0.5, delay: 0, options: UIViewAnimationOptions.CurveEaseInOut, animations: { self.titleField.textAlignment