views:

65

answers:

1

How can I test if the scroll view is bouncing? Is there a notification or something when the bounce ends?

Thanks in advance!

+1  A: 

Yes... check out the UIScrollViewDelegate spec, implement the methods including the two below, and set your UIScrollView's delegate accordingly:

// User stops dragging the table view.

- (void)scrollViewDidEndDragging:(UIScrollView *)scrollView
    willDecelerate:(BOOL)decelerate;

// Control slows to a halt after the user drags it

- (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView;

You will probably be most interested in scrollViewDidEndDecelerating. These also work in UITableView which is where I originally found them (UITableView inherits from UIScrollView).

Adam Eberbach
Thanks a lot. I know this way, I just thought that there is an other method. Thanks! :)
Infinity