UIScrollView - with paging enabled, can I "change" the page width?

Posted by Mike McMaster on Stack Overflow See other posts from Stack Overflow or by Mike McMaster
Published on 2010-02-13T01:04:47Z Indexed on 2010/06/02 22:04 UTC
Read the original article Hit count: 241

Filed under:
|
|

What's the simplest way to have a scroll view (with pagingEnabled set to YES) have a page width set to something other than the scroll view's bounds?

Let me give an example. Suppose I have a scroll view with 10 items, each 150 pixels wide, and my scroll view is 300 pixels wide. If I start with views 1 and 2 visible and scroll horizontally to the right, I want the next "page" to show items 2 and 3. If I scroll one more page to the right, I would see items 3 and 4.

Has anyone done this? If not, what strategy would you use?

© Stack Overflow or respective owner

Related posts about iphone

Related posts about cocoa-touch