iphoneX机型判断

define isIphoneX ({\

int tmp = 0;
if (@available(iOS 11.0, *)) {
if ([UIApplication sharedApplication].delegate.window.safeAreaInsets.top > 20) {
tmp = 1;
}else {
tmp = 0;
}
}else {
tmp = 0;
}
tmp;
})

你可能感兴趣的:(iphoneX机型判断)