It seems to me that the first time I run an animation (animating the frame of a UIView, or the position of a CALayer, etc) it is quite choppy, and subsequent animations are smooth.
What would be causing this, and is there any way to pre-cache the animation?
Note: this question is quite similar to this one: UIImageView animations lag at first run, but UIImages are not being used in my animations.
If you have a TextField
, which I assume is what receives your user input. Use the UITextFieldDelegate
methods Did
and not Should
- (void)textFieldDidBeginEditing:(UITextField *)textField
{
//Do textfield animations and other view animations here
}
Don't do your animations in;
- (BOOL)textFieldShouldBeginEditing:(UITextField *)textField
{
//Don't do textfield animations and other view animations here
//This is where the system does its own animations; raising the keyboard, etc
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With