苹果手机尺寸以及开发中的宽高,宽高就是显示画面的部分
型号 尺寸 逻辑分辨率 像素(ui设计标准)
4s------->4.0英寸--->(320, 480)
5-------->4.0英寸--->(320, 568)
5s------->4.0英寸--->(320, 568)
6-------->4.7英寸--->(375, 667)----->750x1334px(2x图,公司ui以6为标准)
6 plus--->5.5英寸--->(414, 736)---->1080x1920px (3x图,公司ui以6p为标准)
6s ------>4.7英寸--->(375, 667)
6s Plus-->5.5英寸--->(414, 736)
7 ------->4.7英寸--->(375, 667)
7 Plus-->5.5英寸--->(414, 736)
8 ------->4.7英寸--->(375, 667)
8 Plus-->5.5英寸--->(414, 736)
iPhone X -->5.8英寸->(375,812)
以上宽高都是通过这个代码打印出来的
NSLog(@"%@",NSStringFromCGRect(self.view.bounds));
手机详细尺寸
- Tab bar icons通常的尺寸为30x30,最大不能超过44x44
34-06.png
设备信息
//设备名称
return [UIDevice currentDevice].name;
//系统版本型号,如iPhone OS
return [UIDevice currentDevice].systemVersion;
//设备型号,只可得到是何设备,无法得到是第几代设备
return [UIDevice currentDevice].model;
//系统版本名称,如9.3.3
return [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"])
//判断是否为iPhone6
#define IS_IPHONE_6_SCREEN [[UIScreen mainScreen] bounds].size.height == 667.0f