本文共 455 字,大约阅读时间需要 1 分钟。
iOS 判断不同屏幕的宏定义
/** * 1 判断是否为3.5inch 320*480 */#define ONESCREEN ([UIScreen mainScreen].bounds.size.height == 480)/** * 2 判断是否为4inch 640*1136 */#define TWOSCREEN ([UIScreen mainScreen].bounds.size.height == 568)/** * 3 判断是否为4.7inch 375*667 750*1334 */#define THREESCREEN ([UIScreen mainScreen].bounds.size.height == 667)/** * 4 判断是否为5.5inch 414*1104 1242*2208 */ #define FOURSCREEN ([UIScreen mainScreen].bounds.size.height == 1104)
转载地址:http://xsnpi.baihongyu.com/