有没有办法为 SingleViewController
提供自动旋转,因为我们的 iPhone 应用程序有多个 ViewController,并且只需要为一个 ViewController 进行自动旋转。
最佳答案
是的,您可以用于 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 这会很有帮助。
关于iphone - iOS 6 自动旋转仅适用于多个 ViewController 应用程序中的 SingleViewController,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13507056/