2011-11-25 53 views

回答

0

分配一個新的Tab控制器,並將其作爲子視圖附加到該視圖中的導航控制器。

1

比方說,你有一個tabBarController包括兩個選項卡:控制器1 & 控制器1,推動它,只要你想。

UITabBarController * tabBarController = [[UITabBarController alloc] init]; 
UIViewController * controller1 = [[UIViewController alloc] init]; 
UIViewController * controller2 = [[UIViewController alloc] init]; 
tabBarController.viewControllers = [NSArray arrayWithObjects:controller1, controller2 nil]; 
[controller1 release]; 
[controller2 release]; 
[self.navigationController pushViewController:tabBarController animated:YES]; 
[tabBarController release]; 
相關問題