swift 判断是否是iphonex以上机型
2019-01-24 本文已影响22人
咸鱼有只喵
func isiPhoneX() ->Bool {
let screenHeight = UIScreen.main.nativeBounds.size.height;
if screenHeight == 2436 || screenHeight == 1792 || screenHeight == 2688 || screenHeight == 1624 {
return true
}
return false
}