• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How do I get CATransition to actually work?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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 03:38:00 -0400


On Oct 26, 2007, at 9:07 PM, Nick Zitzmann wrote:

Now that the NDA has been lifted, I can finally ask a burning question...

In Leopard, the new CATransition class supposedly animates a CoreImage transition onto a layer.

I'm assuming you're using layers directly, rather than the new animation proxies..


Anyways, transitions don't exactly animate a Core Image transition onto the content of a layer.

But, you can render filters onto layer content using the filters property. (and you can animate that). This is how the Core Animation Menu example from WWDC does it, but in that case you don't need to use transitions.

What are you trying to accomplish? have the content swapped out? Does the animation occur in response to the layer being removed from the hierarchy?

(I ask because the Core Animation Cookbook documentation will grow more effectively for users if I can get input on what people are having issues with)

Has anyone figured out how to get this to work in a similar style to how the transitions work in CoreImage Fun House?


I set up my filter, set it in a transition, set the transition to render into the view's layer, then called -setWantsLayer: on the view to turn on the animation. Instead of showing the transition, the view turned white.

Did you create a layer instance and set it as the view's layer?

Or does your custom view subclass implement the drawRect: method? That may wipe your view empty.

Did you try it using one of the stock transitions? That would help determine if it is how you're configuring the filter, or if it's something else.



just as a rule

layer-backed views are views that use Core Animation backing (setWantsLayer: is Yes) and you let NSView manage the entire underlying layer hierarchy. You stick to using View methods and such.

layer-hosting views are views that you create a CALayer, set it as the layer, and then turn on setWantsLayer:. Then you are responsible for all the layer management.



I was able to work around this, and get Tiger compatibility, by falling back on the old NSAnimation class and a custom view to manually draw the transition to the screen. But the frame rate is really bad on any CPU slower than a 2 GHz Core Duo, which is why I was hoping to get CATransition working one of these days...

If you have an example, send it to me off-list. Or ping me off list.


_______________________________________________

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


  • Follow-Ups:
    • Re: How do I get CATransition to actually work?
      • From: Nick Zitzmann <email@hidden>
References: 
 >How do I get CATransition to actually work? (From: Nick Zitzmann <email@hidden>)

  • Prev by Date: Re: Issue with custom view in Interface Builder 3?
  • Next by Date: Re: How do I get CATransition to actually work?
  • Previous by thread: How do I get CATransition to actually work?
  • Next by thread: Re: How do I get CATransition to actually work?
  • Index(es):
    • Date
    • Thread