How to get UIView frame origin and size while animation

I’m pretty sure that it’s not possible, because when you change the frame of your view it takes effect immediately. In the background, Core Animation takes care of the animation. So, even if you could grab the frame, it’d give you the final coordinates, not the current coordinates in the midst of an animation.

Access the presentation layer of the property, as pointed out by NWCoder in the comments. See the documentation.

[view.layer.presentationLayer frame]

Leave a Comment