views:

306

answers:

1

The documentation says:

If the value of the property is YES, the scroll view stops on multiples of the view bounds when the user scrolls. The default value is NO.

well it's really nice that it stops on multiples of the view bounds when the user scrolls ;) But how many multiples? how's that beeing calculated? I get a really weird behavior. I have 15 little 50x50 images alligned vertically. How can I set up that it would stop on every 50 units scrolled, or on every image? it does stop once on top, once in the middle and once at the end. It's not the behavior I've expected.

+2  A: 

it stops on every multiple of the bounds. I.e. if your scrollview has bounds of 0,0,100,100 it will stop on every multiple of 100 until the end of the content area. Assuming the origin is 0 (0*100) a single swipe gensture will sed you to 0,100 (or 100,0 or 100,100 if directionLock is not enabled).

To debug this removely I'd need to see the bounds, content rect of your scrollview and the frames of all the subview images within the content frame.

I suspect that your scrollview is scrolling to it's bounds multiples not the frames of your subviews - if they don't match up, you'll have to implement paging yourself.

Roger Nolan
Thanks. Yes I think thats the problem. I've set up a scroll view height of 300 and a width of 50. So the user scrolls the images up/down. I expected it to stop on every little 50x50 image inside that scroll view, but it's going to stop at the every full 300 of scrolling.
Thanks