I'm working on an educational iPhone application and am looking for advice on what is the best architecture for a specific portion of my app.
I'm working with iOS 5 so I can use container view controllers. I want to do as much as possible in the storyboard.
Here's what I want to do:
- some data items are listed in a table view controller.
- when the user clicks on one of these items, we start a study session by presenting its main view controller modally.
- a study session is composed of 4 view controllers that are pushed from the right, one after another.
- these four screens have a navigation bar with:
- the same title.
- the same left item: a "Close" button that will dismiss the whole modal study session.
- two of them have a screen-specific right item, the other two don't.
- the transitions between these four screens should be animated in a UINavigationController style, but the navigation bar shouldn't be animated.
Here is a way I'm thinking of for implementing this behavior:
Showing modally a custom container view controller that would contains:
- a UINavigationController without navigation bar, where I would push my screens
- a separate UINavigationBar that would stay above the navigation controller.
The screens would define their navigation bar's right item if any, and the container view controller would be responsible for putting it in the navigation bar.
Does someone have an opinion on this method, or an elegant alternative to suggest?
Thanks. Have a great day!