Alex Rivera | Logout

How to design subviews for UIScrollView when using storyboards for iOS5?

Asked 2011-11-20T19:46:34.613
11

I am using the example from this question: How to combine UIScrollview with UIPagecontrol to show different views? to add a UIScrollView containing multiple subviews to a page in my iPad app.

My app has one large view at the top then a small box at the bottom. The box at the bottom is the UIScrollView; the user will swipe left and right to bring up boxes for various functions in that small section. The large view at the top never changes, so I don't think segues are appropriate.

I have a storyboard with a single View Controller Scene in it. While I can add views to this I can't design 'off screen' views; in other words, there's nowhere I can draw each of my subviews. How can I do this? Do I need to make separate XIBs for each subview? If so, how do I load them in? Or, should I instead make my scrollview (subview width * subview count) wide and draw each view adjacent to the previous one? This is my first iOS app so I may well have some things backwards.

Thanks

Tim

Edit
Report

1 Answer

4

I also found that, but eventually you lose the purpose of storyboarding which is to present you with the full-flow of your graphical application.

What I really feel lacking here is a new cocoa object i.e. UIPagedScrollController that when added to the storyboard would have it's own segue transition similar to UIToolBarController and UINavigationController but would be comprised of both the UIPageControl and UIScrollView needed to make the magic.

answered 2011-12-04T18:45:21.710

Your Answer