我收到了同样的警告,甚至without multiple languages in my app次,这让我发现了到底发生了什么.
这里发生了几件不同的事情.通过将width of the object spacings从固定宽度改为greater than or equal或less than or equal,我可以在自己的应用程序中使用silence the fixed-width warnings.
这可以通过在界面生成器中 Select 对象,转到大小判断器并在那里进行更改来实现:
或者,从文档大纲中 Select 约束,转到大小判断器,然后在那里进行更改:
就屏幕截图顶部的警告而言:
Fixed leading and trailing constraints with a center constraint may cause clipping个
以下是我自己的应用程序的截图,我在其中收到了完全相同的警告:
我有一张标签,上面写着@符号set to leading and trailing to the buttons but also to align the center with the rating label.一旦进入removed the center alignment constraint号州际公路,警告就消失了,但我只剩下一组布局不正确的物体.
就在那时,我听天由命地接受了embrace the Stack View美元.尽管它的使用很烦人,但当您获得所有的约束和设置时,它的布局非常漂亮,而且没有任何警告.
Edit个
As Repose writes in the comments, sometimes simply adding >= 0 will be what you need, as you are making sure two elements do not overlap.