iphone 设备判断


#define DEVICEWIDTH  [UIScreen mainScreen].bounds.size.width
#define DEVICEHEIGHT  [UIScreen mainScreen].bounds.size.height

#define iPhone4  [UIScreen mainScreen].bounds.size.height == 480
#define iPhone5  [UIScreen mainScreen].bounds.size.height == 568
#define iPhone6  [UIScreen mainScreen].bounds.size.height == 667
#define iPhone6Plus  [UIScreen mainScreen].bounds.size.height == 736

#define IsPad [UIDevice currentDevice].userInterfaceIdiom == UIUserInterfaceIdiomPad


你可能感兴趣的:(iphone 设备判断)