开发者

How to find the co-ordinate of object which is in between of CAKeyframeAnimation?

Currently i am moving a png image using CAKeyframeAnimation along a path for 30 seconds. Is there any way to fi开发者_如何转开发nd the co-ordinate of imageview in between the animation? (lets say on 15th second of animation)


Check presentationLayer in your imageview's layer - it contains all informations about layer's current state during animation. e.g. you can get current image center coordinates the following way:

CALayer *presLayer = [imageView.layer presentationLayer];
CGPoint currentCenter = presLayer.center;
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜