您好,我正在创建一个 iOS 应用程序,我希望它始终以纵向模式运行,即使我向左/向右转动它我也希望它保持不变,这里有一些与纵向相关的所有设置的图像。
这就是我设置的所有内容,所以我的问题是,即使我在它运行时倾斜它,它也会以纵向打开,但如果我向左转,它会旋转到横向,我如何保持纵向.
提前致谢,期待您的光临。
最佳答案
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return (interfaceOrientation == UIInterfaceOrientationPortrait);
}
使用该方法只支持竖屏模式
关于ios - Xcode 4.3 纵向运行应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11630312/