iOS - 模糊布局

问题描述 投票:1回答:1

所以我想在两个条件下找到一个UIlabel:1.portrait 2.landscape

据我所知,我正在做,因为我应该根据特征而变化。

我可以看到故事板中的标签,如我所愿:

enter image description here enter image description here

但在iPhone中,它不会出现在横向模式中:

enter image description here enter image description here

在我可以在标签上看到的debugview工具中 - uilabel布局模糊:enter image description here enter image description here enter image description here enter image description here enter image description here

是什么阻止了uilabel的展示?如果是这样我该怎么办?

ios swift autolayout storyboard ios-autolayout
1个回答
0
投票

所以几个小时后我就设法解决了这个问题。 VC继承自基础VC,并且在基础VC中也创建硬编码的标签。如您所见,有2个UIlabel具有相同的文本。我所做的是排除上面的VC,因此标签不会在基础中构建。

© www.soinside.com 2019 - 2024. All rights reserved.