iOS判断和适配刘海屏

2018-09-20  本文已影响0人  流绪微梦H

//判断是否是刘海屏

#define IPHONE_X \

({BOOL isPhoneX = NO;\

if (@available(iOS 11.0, *)) {\

isPhoneX = [[UIApplication sharedApplication] delegate].window.safeAreaInsets.bottom > 0.0;\

}\

(isPhoneX);})

#define NavigationBarHeight                               44.f

#define TabbarSafeBottomMargin                      (IPHONE_X ? 34.f : 0.f)

#define MoreStatusBarHeight                             (IPHONE_X ? 24.f : 0.f)

#define StatusBarAndNavigationBarHeight       (IPHONE_X ? 88.f : 64.f)

#define StatusBarHeight                                      (IPHONE_X ? 44.f : 24.f)

上一篇 下一篇

猜你喜欢

热点阅读