How to get UIScrollView contentOffset during an animation

Posted by user249488 on Stack Overflow See other posts from Stack Overflow or by user249488
Published on 2010-03-21T16:38:43Z Indexed on 2010/03/21 16:41 UTC
Read the original article Hit count: 591

I am trying to get the contentOffset property of a UIScrollView in the middle of a setContentOffset animation. Note I am not using the animated property of the method, but instead enclosing the setContentOffset operation within a UIView animation block so I can have finer control.

When I try to read the value of contentOffset in the middle of the animation, it returns the final value rather than the value at that moment. I know that you can use the presentationLayer to get the current layer, but is there any way you can get the current offset in the middle of an animation?

© Stack Overflow or respective owner

Related posts about uiscrollview

Related posts about iphone