When I set the backgroundColor
property of an CALayer
instance, the change seems to be slightly animated. But I don't want that in my case. How can I set the backgroundColor
without animation?
You can wrap the change in a CATransaction
with disabled animations:
[CATransaction begin];
[CATransaction setValue:(id)kCFBooleanTrue forKey:kCATransactionDisableActions];
//change background colour
[CATransaction commit];
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