Re: Cross-fading between layers
Re: Cross-fading between layers
- Subject: Re: Cross-fading between layers
- From: Kyle Sluder <email@hidden>
- Date: Thu, 18 Oct 2012 09:53:41 -0700
On Oct 18, 2012, at 8:50 AM, Gabriel Zachmann <email@hidden> wrote:
> So far, I am fading out an existing layer, and fading in a new layer by the following 5 lines of code:
>
> [CATransaction begin];
> [CATransaction setAnimationDuration: fading_duration];
> [mainLayer_ replaceSublayer: currentLayer_ with: newlayer];
> currentLayer_ = newlayer;
> [CATransaction commit];
>
> This works fine under Lion, and it worked fine under Snow Leopard.
>
> It does not work any more under ML, i.e., the layers get replaced, but there is no cross-dissolve effect.
My psychic powers tell me that mainLayer_'s delegate is an NSView instance.
Read the Mountain Lion release notes and watch the WWDC videos on implicit animations in AppKit using NSAnimationContext.
--Kyle Sluder
_______________________________________________
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