• 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 glitch: move one sublayer, add/remove another
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CALayer glitch: move one sublayer, add/remove another


  • Subject: Re: CALayer glitch: move one sublayer, add/remove another
  • From: Dave Hayden <email@hidden>
  • Date: Wed, 20 Aug 2008 15:45:23 -0700

(Just noticed that I posted this on quartz-dev, not here. [Didn't get an answer to my question there, either, natch.] For the archives, here's a very questionable workaround to the problem I was having..)


On Jul 18, 2008, at 11:52 AM, Dave Hayden wrote:

Just wanted to see if this is expected behavior, and if there's a workaround. When I add or remove one sublayer and change another's position in the same transaction, the moved layer leaves a "ghost" image that fades away at the start position. If I wrap the two actions in CATransaction begin/commit, it works as expected (no ghost image) if I do the position change first, then the add/remove. If I do the add/remove first, I get the ghost image.

Found a workaround, and it's an ugly one: If I call

[[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode beforeDate:nil];

between the actions they won't interfere with each other. Ick.

Any idea how safe this is? <cue chirping crickets>

-D
_______________________________________________

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


  • Prev by Date: Re: Control-Click vs Right-Click in NSTableView
  • Next by Date: Re: !foo vs foo == nil
  • Previous by thread: Re: !foo vs foo == nil
  • Next by thread: [MEET] CocoaHeads Frankfurt, 1st Sept 8pm
  • Index(es):
    • Date
    • Thread