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];