views:

78

answers:

1

I have a long UIScrollView that I want to page through by a variable amount (I have images of different widths that I want to center on screen as the user scrolls through with paging enabled:

From the UIScrollView Class Reference for pagingEnabled: the scroll view stops on multiples of the view bounds when the user scrolls.

So I guess I need to keep changing the bounds of the scroll view? I can do that, but say my scroll view's frame is 1024px wide (on the iPad) and I want to set the paging so that the next image which is 500px wide gets centered. If I change the bounds of the scroll view to 500px wide, then it no longer responds to touches in the rest of the 1024px wide frame. Any ideas how to get around that?

A: 

why bother changing the size of the scrollview?

won't... [imageView setCenter:CGPointMake(((pageYouAreOn*scrollViewWidth)-(scrollViewWidth/2.0f)),(scrollViewHeight/2.0f))]; (or similar) work?

Thomas Clayson