Reputation: 823
I have image that needs to be scrolled in uiscrollview but scrolling needs to be stopped only at specific points. Imagine I have long image of uitableview so I need to scroll it. What I'm thinking about: is it possible to stop scroll only at points where full row is visible at the top? If yes, then how to do it?
Upvotes: 1
Views: 368
Reputation: 73688
You need to set the coordinates to where you want the scroll to move. This is done here -
[scrollView scrollRectToVisible:CGRectMake(0, 50, 1536, 939) animated:NO];
So you need to specify the exact CGRect
specs you need. But this will work for you.
If you turn animated:YES
then the scroll to this new position is smoothly animated.
Upvotes: 1