//页面的宽高
#define ScrWidth [UIScreen mainScreen].bounds.size.width
#define ScrHeight [UIScreen mainScreen].bounds.size.height
//带有RGBA的颜色设置
#define COLOR(R, G, B, A) [UIColor colorWithRed:R/255.0 green:G/255.0 blue:B/255.0 alpha:A]
//16进制
#define ColorWithHex(hex,alp) [UIColor colorWithRed:((float)((hex & 0xFF0000) >> 16)) / 255.0 \
green:((float)((hex & 0xFF00) >> 8)) / 255.0 \
blue:((float)(hex & 0xFF)) / 255.0 \
alpha:alp]
//判断ios系统
#define xsDeviceVersion [[[UIDevice currentDevice] systemVersion] floatValue]
//获取设备名称 例如:xinsun的手机
#define xsDeviceName [[UIDevice currentDevice] name]
//获取系统名称 例如:iPhone OS
#define xsSysVersion [[UIDevice currentDevice] systemName]
//获取设备唯一标识符 例如:FBF2306E-A0D8-4F4B-BDED-9333B627D3E6
#define xsDeviceUUID [[[UIDevice currentDevice] identifierForVendor] UUIDString]
//获取设备的型号 例如:iPhone
#define xsDeviceModel [[UIDevice currentDevice] model]
网友评论