iOS 最新判断机型设备方法

#define isIphoneXXS [UIScreen mainScreen].bounds.size.width == 375  && [UIScreen mainScreen].bounds.size.height == 812

 

#define isIPhone5 [UIScreen mainScreen].bounds.size.width == 320

 

#define isIPhone66s78 [UIScreen mainScreen].bounds.size.width == 375  && [UIScreen mainScreen].bounds.size.height == 667

 

#define isIPhone6p6sp7p8p [UIScreen mainScreen].bounds.size.width == 414 && [UIScreen mainScreen].bounds.size.height == 736

 

#define isIPhoneXRXSMax   [UIScreen mainScreen].bounds.size.width ==414  && [UIScreen mainScreen].bounds.size.height ==  896

posted @ 2019-01-07 16:44  SoulDu  阅读(246)  评论(0编辑  收藏  举报