ios - Xcode 不遵守设备方向

标签 ios objective-c iphone xcode orientation

我已将设备方向设置为在 Xcode 中仅选中“纵向”。 但是,当我在模拟器中运行我的应用程序时,它会向所有方向旋转。

My Xcode setting

Showing correctly in Portrait (intended) and Landscape (not intended)

有人遇到过同样的问题吗? 谢谢

最佳答案

就我而言(Xcode 13.1),它非常适合我:

按照步骤:

  1. 选择目标;
  2. 选择build设置
  3. 选择AllCombined选项;
  4. 搜索方向关键词
  5. 注意Supported interface Orientations(iPhone),点击右边的值;
  6. 删除不需要的方向。

关于ios - Xcode 不遵守设备方向,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42279651/

相关文章:

ios - iOS 中的图像幻灯片自定义控件

ios - 查看旧导航栏和选项卡栏 Controller 的 Controller 问题

objective-c - 阻止 UIPopover 自动关闭第二部分

iphone, ipad 复制 UIView - 克隆 View

ios - 仅适用于 iPhone 而非 iPod 的应用程序。 (例如 Whatsapp)

iphone - 如何区分它是 SOAP 还是 REST webservice?

ios - xcode 8.x 中缺少 FMDB 库

ios - 在 iOS 中,使用 CGPDFDocumentRef,为什么我的 PDF 显示大边距而不是整个页面?

ios - OpenCV 2.4.4 和 Tesseract 3.02.02 不要链接在一起

ios - NSURLSessionDataTask 导致 CPU 使用率过高