// Add animation to layer; also triggers the animation
[layer addAnimation:anim forKey:@"frameOrigin"];
oints 1 - frameOrigin isn't a property of CALayer. position is. You
can only animate properties of a layer that exist, and that are marked
as animatable in the CALayer class. conceptual doc does cover this.
Perhaps you're confusing with the view frameOrigin method?
point 2 - you're using explicit animation and you're using the default
fillMode (kCAFillModeRemoved). This causes the explicit animation to
be removed when the animation is over. So you blink, and it's gone
back to the start point.
BTW, I'm not sure you want an explicit animation in this case
anyways.. you'd expect that the layer would keep its 100,100 location,
wouldn't you? in that case you could just use implicit animation. If
you really want the different timing function than the default you can
change the implicit animation for the "frame" property.
point 3 is because you're using the wrong delegate method if you're
using animationDidStop: this isn't a CALayer delegate method.
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