开发者

How can I callback as a CABasicAnimation is animating?

I have an animation I'm using to snap a rotatable UIView to a circular grid. As the view a开发者_如何学Pythonnimates, I need to update another view based on the rotating views position.

How can I go about getting the position of the rotating view as it animates into position?


When animation starts you can start a function that will be polling current view position using a timer (I suppose you will need to get presentationLayer from view's layer and get position values from it).

There's no callbacks for CAAnimation other than animationDidStart and animationDidStop so it seems that's the solution (if I'm not mistaken it was also mentioned so in one of WWDC videos).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜