I see many people use this to disable implicit animation:
[CATransaction begin];
[CATransaction setDisableActions:YES];
someLayer.backgroundColor = someCGColor;//no animation
[CATransaction commit];
But without CATransaction begin&commit it also works:
[CATransaction setDisableActions:YES];
someLayer.backgroundColor = someCGColor;//no animation
And like this it also works:
[CATransaction setDisableActions:YES];
someLayer1.backgroundColor = someCGColor;//no animation
[CATransaction setDisableActions:NO];
someLayer2.backgroundColor = someCGColor2; //have animation
So the question is, why I need to use CATransaction begin&commit? Are there any cases that I have to use them?
Thanks , Aunn.