Hi. After much reading and many tutorials I'm now attempting to write my first iPhone app, but already starting to run into complications so want to go back to basics and ask whether I've got the fundamental UI design correct:
- MainWindow.xib has a TabBarController. The TabBarController contains 3 NavigationControllers, each containing a subclassed UIViewController (lets say VC1, VC2 and VC3)
Thus far, straightforward and covered by many tutorials. But now my own thinking takes over and my uncertainty increases:
- One of those 3 views should display a list of data, with a single level of navigation (drill down) to a detailed view.
So why doesn't the TabBarController contain 2 UIViewControllers and 1 UITableViewController, you might ask me. Well, because:
- I also want to allow the user to switch between 2 "types" of data (good comparison would be "Email In" and "Email Out")
- The user should also be able to filter the list (eg. New, Starred, From xyz, etc)
So, I've decided I need a Toolbar.
- The Toolbar contains a 2 part segmented control for switching between data types and a button, to load a Settings page where the filters can be defined.
Therefore VC2 loads VC2.xib, which contains the following:
- A view (containing a Toolbar)
- A subclassed UITableViewController (for displaying my list data)
A subclassed UIViewController (for displaying a settings page)
I then of course, use insertSubview to adapt the view contents according to selections in the Toolbar
Does that all sound reasonable or is there perhaps a flaw in my thinking or a better way to achieve my needs?
I don't want to go into detail here about the actual problem I'm now having. That, assuming my basic architecture is plausible, is a separate question. First I need to know please, whether my basic thinking is correct ;)
Thanks in advance.