3
有什麼辦法來提供自動旋轉到SingleViewController
在我們的iPhone應用程序有多個ViewControllers,需要只有一個做自動旋轉。iOS 6的自轉只SingleViewController在多個視圖控制器應用
有什麼辦法來提供自動旋轉到SingleViewController
在我們的iPhone應用程序有多個ViewControllers,需要只有一個做自動旋轉。iOS 6的自轉只SingleViewController在多個視圖控制器應用
是的,你可以使用你的VC(不轉動)
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
//return (interfaceOrientation == UIInterfaceOrientationPortrait);
return NO;
}
// New Autorotation support for iOS 6.
- (BOOL)shouldAutorotate NS_AVAILABLE_IOS(6_0);
{
Return NO;
}
另見Apple Doc 這會有所幫助。
親愛的談論iOS 6. – Buntylm
@BuntyMadan,然後您可以使用 通過檢查版本 //新的自動旋轉支持。 (BOOL)shouldAutorotate NS_AVAILABLE_IOS(6_0); – HDdeveloper
如果不旋轉,也檢查appDelegate。 // [self.window addSubview:navigationController.view]; [self.window setRootViewController:navigationController]; – HDdeveloper