竖屏
我们都知道在iPhoneX之前机型:
状态栏(statusBar) + 导航栏(navigationBar) = 20 + 44 = 64pt
标签栏tabBar = 49pt


推出iPhoneX后,“齐刘海”屏的状态栏不再是20pt,而是变成44pt,tabBar高度不变

那么顶部状态栏高级发生变化,底部也同样是44pt?
我们看看SafeArea的区域


那么可以知道当没有TabBar情况下,SafeArea距离底部的距离为 83-49 = 34pt

同样方式的横屏
带导航栏和TabBar的SafeAreaInsets:
UIEdgeInsets(top: 32.0, left: 44.0, bottom: 53.0, right: 44.0)
不带导航栏和TabBar的SafeAreaInsets:
UIEdgeInsets(top: 0.0, left: 44.0, bottom: 21.0, right: 44.0)
在iPhoneX中,导航栏高度变成了32pt,标签栏高度变成了53pt
不带导航栏和TabBar的SafeAreaInsets时,距离底部21pt
网友评论