I have some views with subviews, and there are animations going on. Before using shouldRasterize = YES I want to disable animations, so that all animation commands will be ignored inside that view hierarchy sub-branch.
Is there an easy way to do it?
You can use next static method in UIView:
+ (void)setAnimationsEnabled:(BOOL)enabled
See reference for detail info
As said by Victor, you can use the static method + (void)setAnimationsEnabled:(BOOL)enabled
of UIView to disable animations. However, this will disable animations for all views after you call that method. You should remember to enable animations later. As of disabling animations for a specific hierarchy of views but no others, that is not possible.
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