CN1如何处理归位指示器(iPhone X等) [英] CN1 how to deal with the home indicator (iPhone X and such)

查看:61
本文介绍了CN1如何处理归位指示器(iPhone X等)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我们的应用具有正确的布局(避免这些对象违反布局),当我们不得不处理显示器上的(本机)设备特定对象(例如iPhone X中的home指示器)时,我应该适应本机代码还是CN1特定代码中的布局?
您有什么建议?

When we have to deal with (native) device specific objects on the display (such as the home indicator in iPhone X) in case of having a proper layout of our app (avoiding those objects violate the layout), should I adapt the layout in native code or in CN1 specific code? What would you suggest?

推荐答案

我们大多数的努力都是围绕着缺口而不是主页按钮进行的​​,但是我们可能应该添加对 iOS的安全区域API 。尽管从技术上讲,这是一个非常糟糕的API。

Most of our effort was around the notch and not so much on the home button but we probably should add support for iOS's safe area API. Although technically it's a pretty horrible API.

默认情况下,最好将一些设备检测添加到选项卡组件,并在选项卡底部添加一些填充。如果您提出问题,我们可能可以这样做,也可以使用诸如

It might be better to add some device detection to the tabs component and add some padding in the bottom of the tabs by default. We can probably do it if you file an issue, you can do this manually too using a library such as this.

这篇关于CN1如何处理归位指示器(iPhone X等)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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