• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: CALayer removeFromSupeLayer crashes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CALayer removeFromSupeLayer crashes


  • Subject: Re: CALayer removeFromSupeLayer crashes
  • From: David Duncan <email@hidden>
  • Date: Sat, 10 Jan 2009 09:43:35 -0800

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


  • Follow-Ups:
    • Re: CALayer removeFromSupeLayer crashes
      • From: Dennis Christopher <email@hidden>
    • Re: CALayer removeFromSupeLayer crashes
      • From: Dennis Christopher <email@hidden>
References: 
 >CALayer removeFromSupeLayer crashes (From: Dennis Christopher <email@hidden>)

  • Prev by Date: Re: A Data Object in Cocoa
  • Next by Date: Scroll wheel and cover flow
  • Previous by thread: CALayer removeFromSupeLayer crashes
  • Next by thread: Re: CALayer removeFromSupeLayer crashes
  • Index(es):
    • Date
    • Thread