Re: Core Animation animations stop prematurely at random
Re: Core Animation animations stop prematurely at random
- Subject: Re: Core Animation animations stop prematurely at random
- From: David Duncan <email@hidden>
- Date: Tue, 17 May 2011 08:33:54 -0700
On May 17, 2011, at 1:26 AM, Bill Cheeseman wrote:
> Answering my own question: Although it's hard to be sure that a random problem is really fixed, it appears that the solution was to stop creating Core Animation layers in the view's -initWithFrame: method and instead create them in the view's -awakeFromNib method. I was aware that the layer tree should not be built (with -addSublayer) in -initWithFrame:, but none of the commentaries I read suggested to me that you can't even create the layers in -initWithFrame: and store them in iVars for later use.
There should be no actual restriction like that however. That said, as you point out, if you have view that supports layers and come from a nib, you often have to duplicate work to allow it to work in both situations.
--
David Duncan
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden