Reputation: 1069
Currently i am moving a png image using CAKeyframeAnimation along a path for 30 seconds. Is there any way to find the co-ordinate of imageview in between the animation? (lets say on 15th second of animation)
Upvotes: 0
Views: 111
Reputation: 170839
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;
Upvotes: 1