Hey, So I have 5 images I want in a UIScrollView the user can scroll thru. But i want the scrollview to stop at every image so you'll have to scroll again to see the next image.
How would I do this?
You can use
myuiscrollview.pagingEnabled = YES;
for a simple way which means that the scroll view will stop on multiple of its relevant axis bounds.
But if you want to get a bit cleverer you can use the delegate method
- (void)scrollViewDidScroll:(UIScrollView *)scrollView
and use the contentOffset property to stop at the point you want
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With