UIStackView在X $ C $ 7.3ÇUILabels [英] UIStackView with UILabels in XCode 7.3

查看:178
本文介绍了UIStackView在X $ C $ 7.3ÇUILabels的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

既然我已经更新于X code 7.3我有UIStackView问题。如果我创建一个空的项目,只把两个UILabels在UIStackView默认拥抱和COM pression重点,它让我自动版式错位的错误。它甚至没有一个(!)的UILabel在UIStackView工作,所以优先级并不重要(我想,也许有问题)。

Since I've updated to XCode 7.3 I have a problem with UIStackView. If I create an empty project and just put two UILabels in UIStackView with default hugging and compression priorities, it shows me AutoLayout misplacement error. It even doesn't work with one(!) UILabel in UIStackView, so priorities doesn't matter (as I think, maybe there is the problem).

我记得在第X code 7.3之前,一切都很好。我在两个的MacBook Pro分别检查,这是同样的问题。

As I remember in XCode prior 7.3 everything was fine. I checked on two MacBook Pro separately, it's the same issue.

有谁知道如何解决它?

在这里输入的形象描述

推荐答案

这是一个错误出现在X $ C $ 7.3Ç,因此可以忽略它作为他说亚光。

This is a bug appears in Xcode 7.3, so you can ignore it as what he said matt.

问题

当您使用UIStackView,故事情节无法计算子视图的内在内容的大小

The storyboard can not calculate the intrinsic content size of subviews when you use UIStackView

解决方案

如果你恨看到你的故事板警告你可以FIXE它象下面这样:

If you hate seeing warnings in your storyboard you can fixe it like below :

您应该做的这些步骤的每个子视图的 UIStackView

You should do these steps for each subview of your UIStackView


  • 点击您的子视图的警告

  • 点击更新帧选项

  • 选择在第四个菜单子视图固有大小的占位符
    检查员查看

就像你不会看到警告,你可以看到是否存在任何含糊之处。

Like that you will not see warnings, and you can see if any ambiguities exist

缺点是你应该做的每次更改你的子视图时这个步骤(例如:改变一个的UILabel的文本的大小)

The disadvantage is you should do this steps each time you change your subview (example: changing the size of text of an UILabel)

幻想着苹果修复了在下一版本中这个bug

Hoping that Apple fixes this bug in the next release

在这里输入的形象描述

在这里输入的形象描述

在这里输入的形象描述

在这里输入的形象描述

这篇关于UIStackView在X $ C $ 7.3ÇUILabels的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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