• 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: Is kCAOnOrderOut too good to be true?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Is kCAOnOrderOut too good to be true?


  • Subject: Re: Is kCAOnOrderOut too good to be true?
  • From: Matt Neuburg <email@hidden>
  • Date: Mon, 13 Sep 2010 12:32:28 -0700
  • Thread-topic: Is kCAOnOrderOut too good to be true?

David Duncan said on Mar 09 2010 at 21:13:
> Unfortunately the answer is that this is a bug without a clear solution (in
> the removal case). Your best bet is to hide the layer, then remove it after
> the animation has completed rather than to remove it directly.

Unfortunately this seems not to work either: an animation returned as an
action by e.g. actionForLayer:forKey: when hiding a layer (key @"hidden") is
never performed. So the workaround would presumably involve setting the
layer's opacity to 0.

What I would do, then, is something like this:

[CATransaction setCompletionBlock: ^{
    [layer removeFromSuperlayer];
}];
[CATransaction setValue:@"" forKey:@"byebye"];
layer.opacity = 0;

Now in the delegate's actionForLayer:forKey: you test for the incoming
@"opacity" key and the CATransaction @"byebye" key, and if both conditions
are met, return the desired animation.

m.

>
> On Mar 9, 2010, at 11:52 AM, Steven Degutis wrote:
>
>> Not yet; still asking everyone I know and hoping a Core Animation wizard
>> comes across this thread.
>>
>> On Tue, Mar 9, 2010 at 2:49 PM, Jon Buffington wrote:
>>
>>> Steven,
>>>
>>> Did you ever find a solution to the kCAOnOrderOut animation problem? I was
>>> frustrated by this problem in the past but gave up as the animation was
>>> optional.

--
matt neuburg, phd = email@hidden, http://www.tidbits.com/matt/
pantes anthropoi tou eidenai oregontai phusei
Among the 2007 MacTech Top 25, http://tinyurl.com/2rh4pf
AppleScript: the Definitive Guide, 2nd edition
http://www.tidbits.com/matt/default.html#applescriptthings
Take Control of Exploring & Customizing Snow Leopard
http://tinyurl.com/kufyy8
RubyFrontier! http://www.apeth.com/RubyFrontierDocs/default.html
TidBITS, Mac news and reviews since 1990, http://www.tidbits.com



_______________________________________________

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: Viewing a single NSTextStorage with two sets of attributes
  • Next by Date: Re: Timing of UI events
  • Previous by thread: Re: Timing of UI events
  • Next by thread: Testing Harness, or a/b testing scenario, and sending logs back to developer
  • Index(es):
    • Date
    • Thread