【问题标题】:Upside down - iOS Xcode not working while using autolayout颠倒 - iOS Xcode 在使用自动布局时不起作用
【发布时间】:2015-11-09 15:41:38
【问题描述】:

使用 xcode 6.3.2 中的自动布局功能,我可以为 iPad 和 iPhone 调整视图、按钮和文本字段。但是对于颠倒我的视图不会改变,任何想法我们如何使用自动布局支持颠倒模式而不向您的视图控制器添加任何代码。我还检查了 xcode 项目设置中的颠倒模式。

示例代码:-https://github.com/deepesh259nitk/OrientationSupport

下面的屏幕截图。

最大。

【问题讨论】:

  • Upside down 仅适用于 iPad。

标签: ios autorotate screen-rotation


【解决方案1】:

您还需要在要支持倒置方向的每个视图控制器内覆盖 -supportedInterfaceOrientations,因为默认情况下,该方法在 iPhone 上返回 UIInterfaceOrientationMaskAllButUpsideDown

- (UIInterfaceOrientationMask)supportedInterfaceOrientations
{
    return UIInterfaceOrientationMaskAll;
}

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2015-02-10
    • 1970-01-01
    • 1970-01-01
    • 2015-05-29
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多