iOS 10、XCode 8 中的 AutoLayout 约束问题 [英] AutoLayout constraint issues in iOS 10, XCode 8

查看:29
本文介绍了iOS 10、XCode 8 中的 AutoLayout 约束问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因为我使用 Xcode 7.3 开发了 iOS 应用程序.在使用 Xcode 7.3 查看具有 iOS 10 的设备上的 AutoLayout 约束时,它会正确显示它,但是当使用 Xcode 8 然后在设备上查看然后它没有正确显示.

As I have developed the iOS application using Xcode 7.3. When reviewing the AutoLayout constraint on the device which having iOS 10 using Xcode 7.3 it properly display it but when using the Xcode 8 and then reviewing on the device then it does not show properly.

所以我的问题是,如果我使用 Xcode 7.3AppStore 上部署应用程序,所以 AutoLayout 约束有可能做到在 iOS 10 中无法正确显示.

So my question if I am deploy the application on the AppStore using Xcode 7.3, so there is any chance that the AutoLayout constraint do not show properly in iOS 10.

非常感谢任何帮助.

推荐答案

我在我的一个 iOS 应用程序中遇到了同样的问题,因为约束在 Xcode 7.x 中有效但在 Xcode 8 中无效,所以我找到了一些工作解决它.请找到以下步骤.

I am having the same issues in one of my iOS application as the constraint works in Xcode 7.x but not in Xcode 8, so I have found some work around for resolve it. Please find the below steps.

1) 在 Xcode 8 中打开你的 storyboard,然后它会弹出关于选择初始设备视图,请选择其中一个选项,然后点击选择设备.请在下面找到相同的 GIF 表示.

1) Open your storyboard in Xcode 8, then it popup regarding choose an initial device view, please select one of the option and then click on Choose Device. Please find the below GIF representation for same.

2) 完成更改后,选择情节提要,转到文件检查器,在 Interface Builder Document 部分,选择 Opens In 字段并应用 Xcode 7.x.之后它会弹出有关保存的提示,因此请在出现提示时选择保存并关闭"选项.请在下面找到相同的 GIF 表示.

2) When you complete your changes, select the storyboard, go to File Inspector, on Interface Builder Document section, select the Opens In field and apply the Xcode 7.x. After that it popup regarding save so please select "Save and Close" option when it is prompted. Please find the below GIF representation for same.

3) 关闭 Xcode,然后打开应用程序.

3) Close the Xcode and then open the application.

您的故事板更改将被保存,您的故事板将像在 Xcode 7.x 上一样运行.

希望它对你有用!!!

这篇关于iOS 10、XCode 8 中的 AutoLayout 约束问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆