刘海屏的适配

在你的pch文件中加上下面的代码就可以了

define IS_IPhoneX_All ([UIScreen mainScreen].bounds.size.height == 812 || [UIScreen mainScreen].bounds.size.height == 896)

//状态栏、导航栏、标签栏高度

define Height_StatusBar (IS_IPhoneX_All ? 44.0f:20.0f)

define Height_LIUHAI (IS_IPhoneX_All ? 24 : 0)

define Height_NavBar (IS_IPhoneX_All ? 88 : 64)

define Height_TopBar (Height_StatusBar + Height_NavBar)

define Height_TapBar (IS_IPhoneX_All ? 83.0f:49.0f)

define Height_BottomSafe (IS_IPhoneX_All? 34.0f:0.0f)

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容