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: Bill Cheeseman <email@hidden>
- Date: Tue, 17 May 2011 04:26:34 -0400
On May 16, 2011, at 8:11 AM, Bill Cheeseman wrote:
> When I quit and relaunch the application, the animations sometimes don't run for the full specified duration when I hit the hot key. During any given run of the application, the animations either work correctly every time I hit the hot key, or they stop prematurely every time I hit the hot key.
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.
--
Bill Cheeseman - email@hidden
_______________________________________________
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