IOS 判断设备
IOS 判断设备
//设备名称return [UIDevice currentDevice].name;//设备型号,只可得到是何设备,无法得到是第几代设备return [UIDevice currentDevice].model;//系统版本型号,如iPhone OS return [UIDevice currentDevice].systemVersion;//系统版本名称,如6.1.3return [UIDevice currentDevice].systemName;//判断是否为iPhone#define IS_IPHONE (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone)//判断是否为iPad#define IS_IPAD (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)//判断是否为ipod#define IS_IPOD ([[[UIDevice currentDevice] model] isEqualToString:@"iPod touch"])//判断是否为iPhone5#define IS_IPHONE_5_SCREEN [[UIScreen mainScreen] bounds].size.height >= 568.0f && [[UIScreen mainScreen] bounds].size.height < 1024.0f

浙公网安备 33010602011771号