判断是否为iPhone X的宏定义

#define kDevice_iPhoneX \
({BOOL isPhoneX = NO;\
if (@available(iOS 11.0, *)) {\
isPhoneX = [[UIApplication sharedApplication] delegate].window.safeAreaInsets.bottom > 0.0;\
}\
(isPhoneX);})

你可能感兴趣的:(判断是否为iPhone X的宏定义)