I perform custom drawing in my UIView subclass using:
- (void)drawRect:(CGRect)rect;
How can I enable implicit animation when the drawing changes?
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.
Since there were no other suggestions I went ahead with the layer delegate method. Perhaps that’s the only option anyway.
So in MyView I created a new CALayer property:
And in MyViewController I implemented the delegate method that does the drawing:
Now when a certain property changes I update the layer from MyViewController, which implicitly does a cross fade animation.