Re: How do I get CATransition to actually work?
Re: How do I get CATransition to actually work?
- Subject: Re: How do I get CATransition to actually work?
- From: Nick Zitzmann <email@hidden>
- Date: Sat, 27 Oct 2007 02:18:08 -0600
On Oct 27, 2007, at 1:38 AM, Scott Anguish wrote:
Anyways, transitions don't exactly animate a Core Image transition
onto the content of a layer.
Doesn't that defeat the whole purpose of transitions?
What are you trying to accomplish?
I have a view that can take several states. I want to animate the
view switching from one state to another using a CoreImage transition
filter. I deleted the code a long time ago, since it wasn't working,
but here's what I did.
1. Created a layer for the view, but did not call -setWantsLayer: yet
2. Created a CIFilter and set it up with the transition, and the
before and after images
3. Created a CATransition and set it to use the CIFilter
4. Set the CATransition's delegate
5. Added the CATransition to the view's layer
6. Called -setWantsLayer: with YES
If I read the documentation correctly, then the transition should
start rendering in the view. But what actually happens is the view
turns white, and no transition is drawn (but something is happening
in the background, since the delegate did-start and did-finish
methods are being called).
If I use NSAnimation instead, swap out the view for a pseudo-image
view, and draw each step into the view, then that works, but the
frame rate is awful. I was hoping CoreAnimation would help me out
here...
Nick Zitzmann
<http://www.chronosnet.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