This line appears in Apple's Core Animation docs (link: http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/CoreAnimation_guide/SettingUpLayerObjects/SettingUpLayerObjects.html#//apple_ref/doc/uid/TP40004514-CH13-SW5)
It is recommended that you enable layer support in the content view
of your window whenever possible.
My question is: When can I NOT do that safely?
Explanation:
I've got a few buttons in my UI that I want to animate (rotate) using Core Animation. To do that, they need to be layer-backed. Right now, I've got just the buttons layer-backed and the rest of my views are not. This is working fine. However, Apple does not elaborate on the sentence above, so I'm worried that the animations may break in future releases because the parent views are not layer-backed.
There are two reasons I do not want to layer-back my entire view hierarchy:
- It increases my memory footprint by roughly 230%.
- It causes LOTS of minor glitches (especially since I do a lot of custom drawing).
So, is it safe to enable layer-backing for just a few buttons here and there and NOT enable it for the whole view hierarchy, or am I flirting with disaster? Thanks!