我每次启动Xcode时都必须在storyboard中更新所有内容的框架 [英] I have to update frame of everything in storyboard every time I start Xcode

查看:145
本文介绍了我每次启动Xcode时都必须在storyboard中更新所有内容的框架的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以每次我在Xcode中打开我的项目时,都会有100个警告,因为每个UI对象的帧都已被移动。我必须花时间去每个 UIViewController 并更新它上面的帧。

So each time I open my project in Xcode, I have 100's of warning because the frames of every UI Object has been moved. I have to take the time and go to each UIViewController and update frames on it.

这是否有原因?我怎样才能解决这个问题?我需要提及的任何其他信息?

Is there a reason this happens? How can I fix this? Any other information I need to mention?.

推荐答案

在我的情况下,这种情况发生了,因为当我打开时,我设置了约束和布局的size-class Xcode项目。因此,请确保大小等级保持适用于已应用布局的大小等级,或者如果已被Xcode修改则更改大小等。

In my case, this was happening because size-class for which I have set the constraints and layout got changed when I opens the Xcode project. So make sure that the size class remain the same for which you have applied the layout or change it if it has been modified by the Xcode.

如果上述内容不起作用您可以尝试使用Xcode创建的本地存储库,并在退出Xcode之前提交代码。

If above does not work for you, you can try having a local repository created by the Xcode and commit the code before you quit the Xcode.

希望这有帮助!!

这篇关于我每次启动Xcode时都必须在storyboard中更新所有内容的框架的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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