Re: Controlling some of CoreAnimation's more confusing automation
Re: Controlling some of CoreAnimation's more confusing automation
- Subject: Re: Controlling some of CoreAnimation's more confusing automation
- From: Gwynne Raskind <email@hidden>
- Date: Thu, 21 May 2009 14:44:13 -0400
On May 21, 2009, at 1:09 PM, David Duncan wrote:
I have a UIView that contains a number of CALayers. Nothing unusual
here. The CALayers are subclassed to do their drawing, because that
was easier than separating the delegate logic from my UIView
subclass (since the view can't be the delegate of a sublayer - it
causes an infinite recursion to do so, why isn't there a check for
this somewhere in CA's or Cocoa Touch's code?).
UIKit expects that a view and layer are tightly coupled and that the
view is not a shared delegate between multiple layers, period. Even
if it worked, you would see a lot of behavior that you may not
desire by setting a view as a layer's delegate.
My question, though, is why isn't there an assert somewhere in the CA
or UIView logic that says "WARNING, WARNING, YOU'VE DONE SOMETHING
BAD!!!" Throw an exception or something! :)
1) animate the custom properties more directly with a
CABasicAnimation. I tried this, but it did nothing at all.
Custom property animation is not supported on iPhone OS 2.x or Mac
OS X 10.5.
Well, here's hoping for that support in a future release.
2) get some control over the implicit animation CA is setting up
for the contents transition. CATransaction only lets me set
duration and the "is enabled" flag, whereas CAMediaTiming has a
whole pile of useful parameters.
You can change the default animation for any property of a layer.
See the documentation for -actionForKey: for more information.
Ah ha! This is what I was looking for, thanks!
-- Gwynne, Daughter of the Code
"This whole world is an asylum for the incurable."
_______________________________________________
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