When I animate the location of my UITextField
subclass, the text in the field jumps out of step with the location of the UITextField
holding it, which is very jarring and I can't figure out why it happens:
My subclass adds a button to the right hand side of the text field that when tapped calls a method on the view controller, which changes the textfield border colour and moves the text field up the screen by changing the top space constraint of the text field, and a couple of other views located above it.
[UIView animateWithDuration:0.3
animations:^{
self.tableViewBottomSpaceConstraint.constant = 0;
self.mainLabelHeightConstraint.constant = 0;
self.subLabelTopSpaceConstraint.constant = 0;
self.postCodeFieldTopSpaceConstraint.constant = 12;
[self.view layoutIfNeeded];
}];