问题
i want a TabelView-Navigation and permanently a TabBar at the bottom .
I pushed the TabBarController. It contains a list of Controllers (ViewController, ... and the TableViewController) But if i navigate down in the TableView the TabBar moves to the left outside the window (like the old Table).
How can i use the TabBarController without losing him?
回答1:
The UITabBarController needs to be the root view controller. It sounds like you are pushing a UITabBarController onto the stack of a UINavigationController. What you want to do is make the UINavigationController one of the view controllers managed by the tab bar controller.
回答2:
Do this.
Create the Tab Bar Controller and set it as your rootController.
//You will not have three tabs and you need three view controllers//
Set your First View controller as a Navigation View controller.
// You will now have the Navigation bar at the top//
Create a new file which is a subclass of the UITableViewController.
// set this as your delegate and datasource for your table view controller methods// // pull a table view controller inside the Navigation View Controller as mentioned in (2) & you will have a tableview and navigation view in FirstViewController. Similarly work with the other two tabs
If you have any more doubts; please watch this tutorial on how to do all of these.
http://www.youtube.com/watch?v=LBnPfAtswgw
来源:https://stackoverflow.com/questions/6253743/objective-c-tabbarcontroller-and-tableviewcontroller