ios - Xcode 4.3 纵向运行应用程序

标签 ios xcode4 xcode4.3 portrait device-orientation

您好,我正在创建一个 iOS 应用程序,我希望它始终以纵向模式运行,即使我向左/向右转动它我也希望它保持不变,这里有一些与纵向相关的所有设置的图像。

enter image description here

enter image description here

enter image description here

这就是我设置的所有内容,所以我的问题是,即使我在它运行时倾斜它,它也会以纵向打开,但如果我向左转,它会旋转到横向,我如何保持纵向.

提前致谢,期待您的光临。

最佳答案

    - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{

    return (interfaceOrientation == UIInterfaceOrientationPortrait);
}

使用该方法只支持竖屏模式

关于ios - Xcode 4.3 纵向运行应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11630312/

相关文章:

ios - 使用 NSPredicate 过滤数据数组,其中过滤文本是字符串数组

ios - 链接器命令失败,退出代码 1,框架和库错误

c++ - Xcode 4 外部构建项目和调试

iphone - 如何快速访问Xcode 4.5.1中的文档?

iphone - 如何更新 UITableViewCell 内的标签计时器?

使用加速度计(和陀螺仪)的 iOS 手势识别

ios - UITableView 在插入更多行时滚动到顶部

ios - 连接耳机无声

xcode - Xcode组件安装过程中出错

iphone - 如何使用 HTML5 和 phonegap cordova2.0 为 iphone 应用程序创建操作表?