LightNight
LightNight

Reputation: 1625

UIScrollView Detect scrolling

In my program I have UIScrollView. And I adding buttons dynamically on that. In scrollView there is a property

[scrollView setPagingEnabled:YES];

And when I scrolling on next page buttons which must be at the top moving up for a few pixels. So I think I need programmatically set scrollView scroll position. How can I detect end of scrolling and set scroll position?

Upvotes: 2

Views: 2163

Answers (1)

Luke
Luke

Reputation: 11476

You can implement this scroll view delegate method scrollViewDidEndDecelerating: to detect the end of scrolling.

If you need to set the position then call [myScrollView setFrame: myCGRect]; to accomplish this.

Upvotes: 2

Related Questions