Controlling some of CoreAnimation's more confusing automation
Controlling some of CoreAnimation's more confusing automation
- Subject: Controlling some of CoreAnimation's more confusing automation
- From: Gwynne Raskind <email@hidden>
- Date: Wed, 20 May 2009 22:04:37 -0400
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?).
Each time I call [anInstanceOfCALayer setNeedsDisplay], to update
changes I've made to the layer's custom properties, Core Animation
performs an implicit animation from the old cached data to the new
draw state. For example, if I change a property so that my drawing
code fills a path that was previously empty, the UI shows the filled
space fading into existence.
I've figured out that I can explicitly disable this using the
CATransaction calls wrapped around my call to -setNeedsDisplay. But
I'd like to either:
1) animate the custom properties more directly with a
CABasicAnimation. I tried this, but it did nothing at all.
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.
Any help would be appreciated.
-- 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