0
我的應用程序只支持風景權。UINavigation與LandscapeRight
如果我在風景中啓動持有iPhone的應用程序,所有連續的視圖都以橫向模式呈現。而且他們不自動旋轉到任何方位,因爲我的應用程序禁止在所有視圖控制器使用下面的代碼
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return (interfaceOrientation == UIInterfaceOrientationLandscapeRight);
}
但是,如果我開始用iPhone上的應用程序在縱向模式舉行,中顯示和肖像模式推開我的看法:O(我的看法控制器不支持波泰特模式在所有)
我的應用程序的第一個觀點是作爲ModalView上一個UINavigationController,然後將其解僱,一個新的HomeController被壓入堆棧。
如何重新構造我的應用程序,以便導航控制器正確推送視圖?
這裏是Info.plist的
我didFinishLaunchingWithOptions
方法
_splashController = [[SplashController alloc] initWithNibName:kViewForSplash bundle:nil];
_navC = [[UINavigationController alloc] init];
_splashController.navC = _navC;
_navC.navigationBarHidden = YES;
[application setStatusBarHidden:YES];
[self.window addSubview:_navC.view];
[_navC presentModalViewController:_splashController animated:YES];
初始定位做了訣竅.. =) – tGilani 2012-07-18 09:22:50
很高興我可以幫助:] – 2012-07-18 09:33:16