I have an app that main layout is a custom top bar (with actions similar to a web browser, back, forward, etc.), a left main menu and a center view where all the information is displayed.
So at first I think of this app as a Master-Detail one but the top bar and the navigation options seems to prevent this option.
Then I remember the view controllers containment option. Basically I will try to build the root view controller with a view representing the top bar, a table view as the main menu and in the central view add the child view controllers. This option also allows me to build view controllers with similar layout (left menu and center display view).
The truth is that I'm not 100% sure that this is the better option, so I'm asking here if anyone has experience with something like this and if you think this is the best option to build this kind of layout.
Cheers!
EDIT1: Here is an image that represent the layout. In the content view there could be other views similar to a Master-Detail view.

I would create it like this:
Start with a UINavigationController.
This will allow you to use the UINavigationBar at the top in order to get your Top Menu Bar.
Then, create a custom UIViewController which contains a UITableView and a UIView (not controllers) and push it onto the navigation stack. This allows you to control both views from the same controller, making interaction between them trivial.
On the other hand, if you need to swap out the right or left views a lot and want them to be "stand-alone" then you will be better off using view controller containment as you initially thought. This is slightly more involved, but the UIView class reference has very good documentation on how to accomplish this.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With