I plan to develop an check list app that consists of multiple pages. Each page is going to display a list of simple Yes/No questions and a "Next" button at the bottom of the page.
In terms of the app design I see two options
One
UIViewController
with a stack of full page UIViews (layered, z-index). Switching from page 1 to 2 I'll usesendSubviewToBack
One
UIViewController
per page. Switching from page 1 to 2 I'll present the new ViewController.
Questions: What are are the PROS and CONS of these two approaches. Any other option that I've overseen? What are your experiences, suggestions?
Apple chose the one view controller per page approach in it's implementation of the same idea. That may be in part to maximize generality -- different users of
UIPageViewController
will obviously have different needs. But another consideration is memory; if you have a few dozen pages in the multiple subviews approach, you'll have a few dozen full-page subviews, and that's a quick way to use far more memory than you actually need at any given time.If you do go with a single view controller and multiple subviews, consider instantiating the subviews only as you need them, and removing the ones that you don't need from the view hierarchy. Indeed, since it sounds like all your pages use the same format (checklist), it's hard to see why you'd ever need more than a single view for the pages. When the user selects a different page, you'd simply give the view a new set of data to draw.