I want the UIScrollView scroll 50 px each time, how can I limited it? thank you.
+1
A:
This depends on how you want the effect to work. Implementing UIScrollViewDelegate will give you information when the user scrolls which should allow you to get whatever you are after. I did a similar thing where after the user scrolled I would move the content offset so that my button would always be in the middle.
For this I overrode scrollViewDidEndDragging and called setContentOffset to scroll to where I wanted.
skorulis
2010-08-24 02:54:26