• <bdo id='kBCh0'></bdo><ul id='kBCh0'></ul>

      <small id='kBCh0'></small><noframes id='kBCh0'>

      <i id='kBCh0'><tr id='kBCh0'><dt id='kBCh0'><q id='kBCh0'><span id='kBCh0'><b id='kBCh0'><form id='kBCh0'><ins id='kBCh0'></ins><ul id='kBCh0'></ul><sub id='kBCh0'></sub></form><legend id='kBCh0'></legend><bdo id='kBCh0'><pre id='kBCh0'><center id='kBCh0'></center></pre></bdo></b><th id='kBCh0'></th></span></q></dt></tr></i><div id='kBCh0'><tfoot id='kBCh0'></tfoot><dl id='kBCh0'><fieldset id='kBCh0'></fieldset></dl></div>

        <tfoot id='kBCh0'></tfoot>

      1. <legend id='kBCh0'><style id='kBCh0'><dir id='kBCh0'><q id='kBCh0'></q></dir></style></legend>

        Xcode 7.3 中带有 UILabel 的 UIStackView

        时间:2023-09-10
              <tbody id='9QCW7'></tbody>

          • <small id='9QCW7'></small><noframes id='9QCW7'>

            <i id='9QCW7'><tr id='9QCW7'><dt id='9QCW7'><q id='9QCW7'><span id='9QCW7'><b id='9QCW7'><form id='9QCW7'><ins id='9QCW7'></ins><ul id='9QCW7'></ul><sub id='9QCW7'></sub></form><legend id='9QCW7'></legend><bdo id='9QCW7'><pre id='9QCW7'><center id='9QCW7'></center></pre></bdo></b><th id='9QCW7'></th></span></q></dt></tr></i><div id='9QCW7'><tfoot id='9QCW7'></tfoot><dl id='9QCW7'><fieldset id='9QCW7'></fieldset></dl></div>

              <tfoot id='9QCW7'></tfoot>

            1. <legend id='9QCW7'><style id='9QCW7'><dir id='9QCW7'><q id='9QCW7'></q></dir></style></legend>

                  <bdo id='9QCW7'></bdo><ul id='9QCW7'></ul>
                • 本文介绍了Xcode 7.3 中带有 UILabel 的 UIStackView的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  自从我更新到 Xcode 7.3 后,我遇到了 UIStackView 的问题.如果我创建一个空项目并将两个 UILabel 放入具有默认拥抱和压缩优先级的 UIStackView 中,它会显示 AutoLayout misplacement 错误.它甚至不适用于 UIStackView 中的一个(!)UILabel,所以优先级并不重要(我认为,也许有问题).

                  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).

                  我记得在 Xcode 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.

                  有人知道怎么解决吗?

                  推荐答案

                  这是 Xcode 7.3 中出现的一个 bug,所以你可以忽略它,就像他所说的 matt.

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

                  问题

                  使用 UIStackView 时,storyboard 无法计算子视图的内在内容大小

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

                  解决方案

                  如果您讨厌在情节提要中看到警告,您可以像下面这样修复它:

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

                  您应该为 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)

                  希望 Apple 在下一个版本中修复此错误

                  Hoping that Apple fixes this bug in the next release

                  这篇关于Xcode 7.3 中带有 UILabel 的 UIStackView的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:使用 Interface Builder 中的自动布局而不是代码使 UIView 填充包含视图 下一篇:Xcode6、iOS8 和 (void)layoutSubviews

                  相关文章

                  1. <tfoot id='kokRi'></tfoot>

                    1. <legend id='kokRi'><style id='kokRi'><dir id='kokRi'><q id='kokRi'></q></dir></style></legend>
                      <i id='kokRi'><tr id='kokRi'><dt id='kokRi'><q id='kokRi'><span id='kokRi'><b id='kokRi'><form id='kokRi'><ins id='kokRi'></ins><ul id='kokRi'></ul><sub id='kokRi'></sub></form><legend id='kokRi'></legend><bdo id='kokRi'><pre id='kokRi'><center id='kokRi'></center></pre></bdo></b><th id='kokRi'></th></span></q></dt></tr></i><div id='kokRi'><tfoot id='kokRi'></tfoot><dl id='kokRi'><fieldset id='kokRi'></fieldset></dl></div>

                        <bdo id='kokRi'></bdo><ul id='kokRi'></ul>

                      <small id='kokRi'></small><noframes id='kokRi'>