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]
How do I redraw a UIView's sublayers as I'm animating the UIView's bounds?
Layers don't work like views. If you call setNeedsDisplay (which happends if you have set needsDisplayOnBoundsChange to YES) on the parent layer it will not affect the child layers. You need to call setNeedsDisplay them as well.
If your sublayers need to be resized as well when the parent layer is resized then implement layoutSublayers in the parent (or layoutSublayersOfLayer: in its delegate).
Key value Observing during UIView Animations
You can retrieve the values representing the current state of the UIView's animating layer by accessing its presentation layer. This can be done using code like the following:
CGPoint currentCenter = [[view.layer presentationLayer] center];
Unfortunately, the presentation layer's properties are not KVO-compliant, so the best way I can think of for tracking the current value is to keep polling the presentation layer until it gets near the location you want.
Related Topics
Playing Video Inline in Ionic/Phonegap (Webkit-Playsinline Not Working)
Swift Images Change to Wrong Images While Scrolling After Async Image Loading to a Uitableviewcell
How to Wait for Method That Has Completion Block (All on Main Thread)
Presenting Uialertcontroller from Uitableviewcell
Generating Custom Thumbnail from Alassetrepresentation
To Change the Color of Unselected Uitabbar Icon in iOS 7
Using Apple's Reachability Class in Swift
Strong Reference to a Weak References Inside Blocks
How to Move to the Next Page in Facebook JSON Response Using iOS Sdk
Swiftui Transitions: Scale from Some Frame - Like iOS Homescreen Is Doing When Opening an App
How to Make Uipageviewcontroller Reuse Controller Like Tableview Reuse Cell
"This App Is Not Allowed to Query for Scheme Cydia" iOS9 Error
"The Run Destination iOS Device Is Not Valid for Running the Scheme"
iOS Server Side Validation - Receipt Types
Uiimagejpegrepresentation Has Been Replaced by Instance Method Uiimage.Jpegdata(Compressionquality:)