Short one this week!
When using CATextLayer
, it's common to change both the frame
/bounds
as well as the string
property. You might find that even if you precede it with:
[CATransaction setValue:kCFBooleanTrue forKey:kCATransactionDisableActions];
the built-in animation still kicks in and animates the content change in an odd manner (since the bounds has also changed). What you need, to disable that is:
textLayer.actions = @{@"contents": [NSNull null]};
There are various keys you can use to disable built-in animations such as kCAOnOrderIn
and kCAOnOrderOut
.
Your feedback is valuable: Do you want more nuggets like this? Yes or No
.
.