Re: Cross-fading between layers
Re: Cross-fading between layers
- Subject: Re: Cross-fading between layers
- From: William Squires <email@hidden>
- Date: Wed, 24 Oct 2012 22:51:35 -0500
I'm surprised it worked at all under any version of OS X, since you set the current layer to the new layer before committing the transition! Since it sees the two layers are the same, there's nothing to change, so nothing happens (I thinkā¦)
On Oct 18, 2012, at 10:50 AM, Gabriel Zachmann wrote:
> About a week ago I have posted about my problem with (not) cross-fading Core Animation layers in Mountain Lion.
>
> Perhaps, my post was too long ;-)
> Perhaps I forgot to mention that I did google quite bit, but didn't understand what the best solution would be in my case.
>
> 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.
>
> Apparently, a number of other people have a similar problem, but the solutions some of them propose were not clear to me.
>
> Could some kind soul explain to me how to achieve the cross-dissolve effect under ML?
>
> Thanks a lot in advance.
>
>
> Best regards,
> Gabriel.
>
>
> _______________________________________________
>
> 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
_______________________________________________
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