为什么当模拟器处于横向模式时 UILabel 不显示?

Why doesn't the UILabel show when the simulator is in Landscape Mode?

我想让这个 UILabel 在 iPhone 模拟器的横向模式下正确显示。我想我已经对AutoLayout机制做了很好的约束。

这是我的 StackView 约束:

这是我的 CountLabel 约束:

切换到横向模式时:

我期望的是:

请帮我解决这个问题。 我的约束有什么问题吗?

您应该删除 countLabel.top 和 stackView.bottom 的约束。 或者您可以将 countLabel.top 和 stackView.bottom 的约束更改为 <=