iPhone X安全区域似乎低于不透明工具栏 [英] iPhone X Safe Area Appears to be below Opaque Toolbar

查看:145
本文介绍了iPhone X安全区域似乎低于不透明工具栏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法将iPhone X上的视图正确约束在底部不透明工具栏上方。

I can't properly constrain a view on the iPhone X to be above the bottom opaque toolbar.

您可以在此处看到视图限制在底部安全区域被工具栏遮挡:

You can see here that the view constrained to the bottom of the Safe area is obscured by the toolbar:

虽然对于其他iPhone型号和尺寸,视图正确显示在工具栏上方:

While for other iPhone models and sizes the view is correctly displayed above the toolbar:

以下是我添加的限制条件:

Here are the constraints I've added:

有人可以向我解释我该怎么办?

Could someone kindly explain me what should I do?

推荐答案

我已经解决了我通过选择在Opaque Bars下扩展边缘为有问题的UIViewController进行ssue:

I've solved the issue by selecting "Extend edges under Opaque Bars" for the UIViewController in question:

启用选项:

With option enabled:

禁用选项:

With option disabled:

另一种选择是使用半透明工具栏,如@Silmaril在问题的另一个答案中提到的那样。

The other option is to use a translucent toolbar as @Silmaril has mentioned in another answer to the question.

这篇关于iPhone X安全区域似乎低于不透明工具栏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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