0
在我的應用程序中,我添加了UITabBarController * rootController;如何在iPad中自動旋轉?
in didFinishLaunchingWithOptions我完成了這段代碼。 爲我寫
WaylistController *waylistNavigationControllerTemp = [[WaylistNavigationController alloc] initWithNibName:@"WaylistNavigationController" bundle:nil];
self.waylisyViewController = waylistNavigationControllerTemp;
UINavigationController * waylistNavigationController = [[UINavigationController alloc] initWithRootViewController:waylisyViewController];
[waylistNavigationControllerTemp release];
WayRoomController *wayRoomNavigationControllerrTemp = [[WayRoomNavigationController alloc] initWithNibName:@"WayRoomNavigationController" bundle:nil];
self.WayRoomViewController = wayRoomNavigationControllerrTemp;
UINavigationController * wayRoomNavigationController = [[UINavigationController alloc] initWithRootViewController:WayRoomViewController];
[wayRoomNavigationControllerrTemp release];
rootController.viewControllers = [NSArray arrayWithObjects: WaylistNavigationController,//0
WayRoomNavigationController,//1
nil]
[rootController setSelectedIndex:0];
這個我沒有得到自動定向總是隻得到愛國者。任何人請幫助我?