3

I need something like a UIScrollview with flexible pageWidth.

As an example; my scollview has 5 buttons. The middle button is the widest. 2nd and 4th buttons have a smaller width. 1st and 5th button are the smallest in width.

| button 1 |    button 2    |        button 3        |    button 4    | button 5 |

How can I build something like that within a UIScrollView with paging enabled?

Till
  • 27,559
  • 13
  • 88
  • 122
AzabAF
  • 632
  • 1
  • 4
  • 19
  • 1
    I doubt this be essentially implemented in UIScrollView as-is, but how about finding the largest common denominator of the widths and making that the page width, then scrolling multiple pages programmatically detecting its position? –  Oct 14 '12 at 10:18
  • 1
    I wonder why this has been downvoted so heavily. The question seems rather clear. – Till Oct 14 '12 at 12:33
  • question is genuine. I am also looking for a solution. Here is my question http://stackoverflow.com/questions/14500087/uiscrollview-enable-paging-after-screen-width-goes-wider – Vaibhav Saran Jan 24 '13 at 12:04

1 Answers1

1

If i got your requirement right then please read the following blog post (Alexander Repty) regarding this very topic! It's an older entry but it describes the approach well. In short, it's not as simple as just changing the width of the "page" but managable!

Alternatively check out this post also.

Community
  • 1
  • 1
Nenad M
  • 3,055
  • 20
  • 26