After doing some Core animations using:
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:0.5];
[self setAffineTransform:CGAffineTransformIdentity];
[UIView commitAnimations];
I noticed that if I simply fire up change of an attribute, it would still use animations instead of simply changing the attribute. for example setAffineTransform…
Is that something inherent to animations on iOS? Am I missing something or something in my code must be wrong ?
Thanks!
setAffineTransform:is a method on CALayer, not UIView, as is the opacity you also mention. Changes to these properties are implicitly animated, that is, setting them causes the layer to animate to the new value rather than switch instantly.A list of the implicitly animated properties is here. To disable implicit animations, wrap the updates in a CATransaction, with implicit animations disabled, as described here.