tab bar not in main xib iphone
how can I implement a tab bar controller 开发者_JS百科in a window that is not the mainWindow.xib ?? are there any examples, or just what shall I connect to accomplish this? tnx!
UITabBarController is not intended to be pushed on as/or added to another view except of the root view(window) of your application. So what you are saying is you want a UITabBarController to appear inside a UINavigationController. However this is not "allowed". The UITabBarController is intended as a solid point of navigation, think of the Windows "Start-bar", it always remains at that fixed position.
To achieve this in code you could add the the UITabBarController to your window in the appdelegate. Then add UINavigationController to the different tabs in your application.
Because the UITabBarController class inherits from the UIViewController class, tab bar controllers have their own view that is accessible through the view property. When deploying a tab bar interface, you must install this view as the root of your window. Unlike other view controllers, a tab bar interface should never be installed as a child of another view controller.
http://developer.apple.com/library/ios/#documentation/uikit/reference/UITabBarController_Class/Reference/Reference.html
精彩评论