I have this code to animate a UITextField width limit
self.myTextFieldWidthConstraint.constant = 200 UIView.animateWithDuration(2, delay: 0.0, options: UIViewAnimationOptions.CurveLinear, animations: { () -> Void in self.viewContainer.layoutIfNeeded() }, completion: nil)
It works great, the only problem is that if there is text in the text box, during the animation it is compressed by the width of the characters, and then it is adjusted to the correct size again. Placeholder text does not have the same problem.
Here is the gif: http://makeagif.com/mr4u1D
source share