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;
精彩评论