ios - 更新到 Xcode 8 后的布局问题

标签 ios xcode autolayout xcode8 ios10

这是我升级到 Xcode 8 后我的一个屏幕的前后对比图。
我所做的只是打开我的 main.storyboard 并从那里构建并运行我手机上的应用程序。
在我的版本控制中,我可以看到 Xcode 正在对我的 main.storyboard 进行大量更改,只要我打开它。
每当我删除这些更改时,我都可以看到我在 Xcode 7.3.1 中看到的内容。
但是,一旦我用 Storyboard重新打开界面生成器,我就会看到这些更改又回到地方。

我可以在这里做点什么吗?

Xcode 8 之前

enter image description here

更新到 Xcode 8 之后

enter image description here

最佳答案

一旦我将 Storyboard文件转换为与 Xcode8 兼容,我就遇到了类似的问题,tableview 图像没有出现。这看起来像是 Xcode8 的错误,因此在发布错误修复之前,这里有一个解决方法:

  1. 在 Xcode 8 中打开 Storyboard并选择初始设备 View 。像往常一样进行更改。
  2. 完成更改后,选择 Storyboard -> File Inspector -> Opens in -> 选择“Xcode 7.x”。

enter image description here

  1. 出现提示时选择“保存并关闭”
  2. 您的 Storyboard 更改将被保存,您的 Storyboard 将像 Xcode8 之前的版本一样运行。

当您需要对 Storyboard文件进行其他更改时,请再次执行这些步骤。

关于ios - 更新到 Xcode 8 后的布局问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39497572/

相关文章:

ios - IB : adding constraint related to a second view 中的自动布局

ios - swift - firebase facebook 身份验证时出现 invalid_credentials 错误?

ios - Bootstrap 4 选项卡在 iOS 上无法使用 "data-target"而不是 "href"属性

ios - 架构 armv7 的 undefined symbol : "_OBJCCLASS$_ALAssetsLibrary"

ios - 使用 Xcode 提交到 App Store

ios - 应用程序在 UIViewController 发布时崩溃

ios - 在 iOS 中根据设备高度定位 View

ios - 我必须写入哪些heathkit数据才能为事件应用程序的绿色运动环做出贡献?

ios - 为 Storyboard View Controller 设置 "Custom class"或子类化 UIViewController 并创建其实例有什么不同?

objective-c - Mac OS X 中的自动布局和调整 View 大小