Re: CALayer removeFromSupeLayer crashes
Re: CALayer removeFromSupeLayer crashes
- Subject: Re: CALayer removeFromSupeLayer crashes
- From: Dennis Christopher <email@hidden>
- Date: Mon, 19 Jan 2009 09:08:10 -0500
Men,
I was to find an over-release of the layer's delegate object using
Instruments. Removing this solved the crash. Thanks for all your
suggestions.
Dennis Christopher
On Jan 10, 2009, at 12:43 PM, David Duncan wrote:
On Jan 9, 2009, at 12:19 PM, Dennis Christopher wrote:
NSArray *theLayers = [[self layer] sublayers];
for(CALayer *layer in sublayers) {
[layer removeFromSuperlayer];
I'm new to CALayer and at a loss as to what could be wrong with this.
Any suggestions would be appreciated.
(I've read through most of Dudney's Core Animation book but nothing
jumps out at me.)
I would suspect that you'd see a message on the console to the effect
of "modifying an array while enumerating it". I think you can replace
this more simply by just doing [[self layer] setSublayers:nil].
--
David Duncan
Apple DTS Animation and Printing
_______________________________________________
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