Cross-fading between layers
Cross-fading between layers
- Subject: Cross-fading between layers
- From: Gabriel Zachmann <email@hidden>
- Date: Thu, 18 Oct 2012 17:50:26 +0200
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