以我標籤基於應用程序委託我添加導航控制器像下面,navigationcontroller標題和按鈕
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
UIViewController *viewController1 = [[FirstViewController alloc] initWithNibName:@"FirstViewController" bundle:nil];
UIViewController *viewController2 = [[SecondViewController alloc] initWithNibName:@"SecondViewController" bundle:nil];
UIViewController *viewController3 = [[view1 alloc] initWithNibName:@"view1" bundle:nil];
UIViewController *viewController4 = [[view2 alloc] initWithNibName:@"view2" bundle:nil];
UIViewController *viewController5 = [[view3 alloc] initWithNibName:@"view3" bundle:nil];
self.tabBarController = [[UITabBarController alloc] init];
self.tabBarController.viewControllers = @[viewController1, viewController2,viewController3,viewController4,viewController5];
navigationController=[[UINavigationController alloc]initWithRootViewController:self.tabBarController];
[self.window addSubview:[navigationController view]];
self.window.rootViewController = self.navigationController;
我將不能夠添加在每個視圖的標題。 ?雖然增加它不顯示標題請幫助我解決這個問題
http://developer.apple.com/library/ios/#documentation/WindowsViews/Conceptual/ViewControllerCatalog/Chapters/NavigationControllers.html – fionbio
我按照文檔進行了操作,但未顯示應該如何處理我改變了編碼? –
您被分配FirstViewController並分配給UIViewController對象。 FirstViewController * vc1 = [[FirstViewController alloc] init .....]; – Durgaprasad