为什么我在iPhoneX模拟器底部看到白色区域?

时间:2018-03-19 01:10:30

标签: ios swift autolayout iphone-x

我已经在stackoverflow中读到了一些像Seeing black bars at the top and bottom of the iPhone X Simulator这样的答案,但它似乎有点不同,因为我的问题只发生在屏幕的底部区域

enter image description here

我们可以看到,loginVC底部有一个白色区域。我希望我的UIImage(背景图片)覆盖白色屏幕区域。

我已将UIImage的图像底部约束设置为安全区域,如下所示

enter image description here

我还使用了“使用安全区域布局指南”

enter image description here

这里出了什么问题?

1 个答案:

答案 0 :(得分:1)

删除align bottom to Safe Area并添加Bottom Space to super View(将底部空间附加到superview,类似于您的顶部空间 - 附加超级视图)

(另外,为包含文字的标签设置align bottom to Safe Area"请联系IT支持")

enter image description here

更新

这是一种针对您的问题的补丁解决方案。你应该在你的安全区域布局之外设置Layer(相对于超级视图设置1357层的所有锚点)并添加附加的(所有锚点)Safe Area布局附加的透明视图(UIView),包含所有其他UIElements,以便处理它容易。