Refreshing UIScrollView / Animation, timing (Objective-C)

Posted by Switch on Stack Overflow See other posts from Stack Overflow or by Switch
Published on 2010-04-11T20:07:16Z Indexed on 2010/04/11 20:13 UTC
Read the original article Hit count: 542

Filed under:
|
|

I have a UIScrollView that is displaying a list of data. Right now, when the user adds one more item to the list, I can extend the content size of the UIScrollView and scroll down smoothly using setContentOffset and YES to animated.

When the user removes an item from the list, I want to resize the content size of the UIScrollView, and scroll back up one step also in an animated fashion.

How can I get the ordering right? Right now, if I resize the content size before scrolling back up, the scroll isn't animated.

I tried scrolling back up before resizing the content size, but that still didn't give a smooth transition.

Is there a way to finish the scrolling animation BEFORE resizing the content size?

Thanks

© Stack Overflow or respective owner

Related posts about objective-c

Related posts about uiscrollview