I guess I'm just really looking for some advice on how to approach my problem.
So far I have an application with a navigationcontroller that has a table view.
Every cell in the table has a text field and image and a disclosure button.
This is sort of my main menu option navigation screen.
When a user clicks a disclosure button I would like to go to a sub view of a tab view controller. The tab view will show different content depending on what cell is selected.
I'm guessing it would have something to do with the accessoryButtonTappedForRowWithIndexPath but after that I'm a little lost.
I've only ever experienced 开发者_Go百科tab controllers from an example in a book where the tabbar controller was dragged onto a window in interface builder.
I'd like to try and pin down a direction to set to work to
I would highly recommend re-thinking your use of the tab bar here. The tab bar is intended to be a top-level control for navigating logically separate parts of your applications. Normal use would be tabs that contain navigation controllers that drill into detail within the navigation.
You may consider changing to use a toolbar rather than a tab bar. The toolbar is intended to change for the context of your current view. You can define the toolbar items in the view for the current navigation bar very easily.
All that said, if you are still set on using tab bar, I would keep the tab bar at the top level of your application and use setViewControllers:animated:
to change the tabs when necessary. Again, I think this will end up producing a pretty confusing UI however.
精彩评论