gpt4 book ai didi

ios - 倒置 - iOS Xcode 在使用自动布局时无法正常工作

转载 作者:行者123 更新时间:2023-11-28 18:55:40 26 4
gpt4 key购买 nike

使用 xcode 6.3.2 中的自动布局功能,我能够为 iPad 和 iPhone 调整我的 View 、按钮和文本字段。但是对于颠倒我的观点并没有改变,任何想法我们如何使用自动布局支持颠倒模式而不向您的 View Controller 添加任何代码。我还在 xcode 的项目设置中检查了颠倒模式。

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

下面的屏幕截图。

enter image description here

enter image description here

最大

最佳答案

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

- (UIInterfaceOrientationMask)supportedInterfaceOrientations
{
return UIInterfaceOrientationMaskAll;
}

关于ios - 倒置 - iOS Xcode 在使用自动布局时无法正常工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33612749/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com