Both Nav Controller & Tab Controller -> but select tabs only!
Fellow Forum Users,
I am stumped and would really appreciate someone's help. Basically, I have created an App, using the Tab Bar Controller, that has 6 tabs. Here is the architecture:
1) MainWindow.xib
a) Tab Bar Save - App Delegate (referencing UI Window & Tab Bar Controller)
b) Tab Bar Controller - Each tab loads from a NIB (seperate XIB file), however all tabs have one view controller (called AllTabsController), EXCEPT for one.
c) Tab 4 - uses RootViewController, which is of type TableViewController, and thus is the only tab that contains a TableView.
2) TabBarSaveDelegate.h/m - This is of course the main app code, which currently contains the window element and the tab controller. it calls [window addSubview:tabBarControllor.view] in the appDidfinishlaunching function.
3) 5 basic XIB files - these files all have their views designed in the interface builder, each with unique fields and buttons, and obviously unique button/field handlers. All the handling logic is in AllTabsController.h/m
4) AllTabsController.h/m - defines all the UITextField and buttons, etc for 5 tabs, and extends the ABPeoplePicker, as three tabs heavily depend on using the Address Book picker on the iphone to pick a content.
5) ThirdView.xib - (sorry for the poor name), this XIB contains a Tableview element and a searchbar. this is connected to RootViewController - this connection is defined in the interface builder in the ThirdView.xib, as well as as part of the Tab Bar Controller, in the MainWindow.xib.
6) RootViewController.h/m - contains the code to load the table and carry out searching. The table is loaded from an array - no complicated SQL lite or web services work here.
7*) DetailViewController.h/m & DetailView.xib - this is basically to support drill down from a selection of a cell in the table view. This however does NOT work for me at this point, because of controller issues, as the design I've downloaded pushes to the Navigation controller stack (as I've seen in all the apps I have with drill down capability).
ISSUE:
For my code to work, I need to be able to use the NavigationController, in parallel with the Tab Bar Controller. I have suffered issues with control of the window, having both. What I really need is for the Nav Controller to only appear on the tab with the Table View. This should be possible, as part of the Tab Controller - since I have 6 tabs, there is a More button - it automatically takes me the exact drill down type thing I am looking for.
The question is - where do I add the Navigation Controller object? Specifically, where should it be instantiated, then do I call [window addSubView] somewhere else? I have tried adding it to MainWindow.xib and instantiating it the in root delegate, but I don't have access to [window] in my RootViewController. Since rootViewController is a controller, I dont think there is anyway to add the NavController there.
Has anyone ran into this?