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: Scott Anguish <email@hidden>
- Date: Sat, 27 Oct 2007 14:56:06 -0400
On Oct 27, 2007, at 4:18 AM, Nick Zitzmann wrote:
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?
It was difficult to understand exactly what you were trying to
accomplish from the original wording (i.e. were you just trying to
apply the Core Image filter to the content directly)
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
You shouldn't set the before and after images. the inputImage and
inputTargetImage and the outputImage all are set up automatically for
you by Core Animation. The filter needs to support those keys though.
Any additional keys you must set up. (Thinking about this more, I'll
bet there is one more key that is required by CA to support it
"inputTime"... Which is the thing that will animate over time.. I'll
check with engineering.)
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
aside from the setting of the images, it sounds right.
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).
Which CIFilter were you trying to use? I'll play with it if you can
tell me.
But if you're switching between an old content image, and a new
content image, the example I sent along will do that... and you can
customize the
_______________________________________________
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