更新到 Xcode 8 后的布局问题 [英] Layout issues after updating to Xcode 8

查看:31
本文介绍了更新到 Xcode 8 后的布局问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我升级到 Xcode 8 后我的一个屏幕的前后对比.
我所做的只是打开我的 main.storyboard,然后从那里构建并运行我的应用程序在我的手机上.
在我的版本控制中,我可以看到 Xcode 对我的 main.storyboard 做了很多更改,我打开它.
每当我删除这些更改时,我都可以看到我在 Xcode 7.3.1 中看到的内容.
但是,一旦我用故事板重新打开界面构建器,我就会看到这些更改又恢复原状.

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

Here is a before and after of one of my screens after I upgraded to Xcode 8.
All I did was open up my main.storyboard and from there, I built and ran my app on my phone.
In my version control, I can see Xcode is doing a lot of changes to my main.storyboard just from me opening it.
Whenever I delete those changes, I can see what I use to see in Xcode 7.3.1.
But, as soon as I re-open interface builder with my storyboard, I see those changes come back into place.

Is there something I can do here?

推荐答案

我遇到了类似的问题,一旦我将故事板文件转换为与 Xcode8 兼容,tableview 图像就不会出现.这看起来像是 Xcode8 的一个错误,所以在发布错误修复之前,这里有一个解决方法:

I had a similar problem with tableview images not appearing once I converted the storyboard file to be Xcode8 compatible. This looks like a bug with Xcode8, so until a bug fix is released, here is a work around:

  1. 在 Xcode 8 中打开您的故事板并选择初始设备视图.像往常一样进行更改.
  2. 完成更改后,选择 storyboard -> File Inspector -> Opens in -> 选择Xcode 7.x".

  1. 出现提示时选择保存并关闭"
  2. 您的故事板更改将被保存,您的故事板将像在 Xcode8 之前一样发挥作用.

当您需要对故事板文件进行其他更改时,请再次执行这些步骤.

When you need to make other changes to the storyboard file, follow these steps again.

这篇关于更新到 Xcode 8 后的布局问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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