“导航栏”的警告框将在XCode 8 Swift 3中出现的运行时不同 [英] Warning frame for "Navigation bar" will be different at run time appears in XCode 8 Swift 3

查看:105
本文介绍了“导航栏”的警告框将在XCode 8 Swift 3中出现的运行时不同的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我升级到 XCode 8 之前,在这种情况下我没有看到此错误。我有不同的导航控制器。对于所有这些我看到错误导航栏的框架在运行时将有所不同。导航栏预计:宽度= 384,实际:宽度= 375 。实际上,这些导航控制器没有导航栏导航栏存在子视图。无论如何,我可以通过勾选解决它并取消勾选中显示导航栏属性检查器。但不幸的是每次我重新打开 Main.storyboard 这个警告再次出现。如果我点击黄色三角形然后再更新帧没有任何想法?

Before I've upgraded to XCode 8 I haven't seen this error in such case. I have different Navigation Controllers. For all of them I see an error Frame for "Navigation bar" will be different at the run time. Navigation bar "Expected: width=384, Actual: width=375. In reality these Navigation Controllers doesn't have Navigation bar. Navigation bar exists for subviews. Anyway I could solve it by tick and untick the checkbox Shows navigation bar in Attributes inspector. But unfortunately every time I reopen Main.storyboard this warning appears again. Also if I click on yellow triangle and then on update frames nothing happen. Any Ideas?

推荐答案

如果将属性模拟大小更改为自由形式,警告将消失。

Warning will disappear if you change the property "Simulated Size" to "Freeform".

这篇关于“导航栏”的警告框将在XCode 8 Swift 3中出现的运行时不同的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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