Main.storyboard常见警告

使用Main.Storyboard会遇见许多警告,说一下如何解决问题。

1 Plain Style unsupported in a Navigation Item。

导航栏的按钮不支持plain 样式的。

解决方法:修改plain样式为Done、Bordered。需要修改所有的导航栏上的按钮bar butoon itme。


2 Scene is unreachable due to lack of entry points and does not have an identifier for runtime access via -instantiateViewControllerWithIdentifier:.

为了在程序中动态访问Scene,需要给其设置一个Storyboard ID。

解决办法:给Storyboard中的所有 ViewController设置一个Storyboard ID,需要都设置才能去掉这个警告。


3  Value other than autosizing specified for width (System items, other than fixed spaces, should use autosizing)

在界面底部放了一个toolbar,

效果如图所示 

其中的子控件宽度更改后出现这个问题。

解决方法:使用自动调整大小,不要设置其宽度,也就是设置成0即可。如图所示:



4 Vertical position is ambiguous for "scan_bind.png".

垂直位置不确定。

解决方法:添加竖直约束,例如“


Horizontal position is ambiguous for "iconView".

水平位置 不确定

添加水平位置 约束条件即可,如图所示:

  iconView.centerX = centerX.


5 Height and horizontal position are ambiguous for "Table View Setting".

高度和水平位置不确定。

缺少高度和水平开始位置。

解决办法:添加高度和水平位置 约束。



6 Frame for "Unbond Btn" will be dirrerent at run time .

 位置在运行时将会不一样。storboard上的位置和运行时将会不一样。

解决办法

水平位置有问题,只需要将这个按钮右移到30就可以了。

 约束该按钮宽度为540,但画布上(storyboard)宽度为550。只要将宽度拉一下变成540就可以了。

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值