tag:blogger.com,1999:blog-12685723.post417727354305852617..comments2023-06-04T06:19:05.726-07:00Comments on Allara: Learning the value of CATransactionAllarahttp://www.blogger.com/profile/04721241532459058147noreply@blogger.comBlogger1125tag:blogger.com,1999:blog-12685723.post-89005527143384191532012-07-20T03:12:45.887-07:002012-07-20T03:12:45.887-07:00I'm aware that the post is from 2010, but for ...I'm aware that the post is from 2010, but for people who may in the future search for a way to disable implicit animations, here's a tip.<br /><br />Instead of setting duration to zero, how about turning off "actions" - the specifications on how to generate the implicit animation?<br /><br />You can disable them using transactions:<br /><br />[CATransaction setValue:(id)kCFBooleanTrue forKey:kCATransactionDisableActions];<br /><br />Also, you can disable them per-layer, by subclassing CALayer and overriding -actionForKey: to return nil. Or, if you have a layer delegate, -actionForLayer:forKey: should return nil, too. <br /><br />Apple docs:<br />https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/CoreAnimation_guide/Articles/Actions.html<br /><br />StackOverflow:<br />http://stackoverflow.com/questions/2244147/disabling-implicit-animations-in-calayer-setneedsdisplayinrectIvan Vučicahttps://www.blogger.com/profile/09801850158138970240noreply@blogger.com