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?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
As said by Victor, you can use the static method
+ (void)setAnimationsEnabled:(BOOL)enabledof 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.