iOS 开发中常用的型号和尺寸

经常忘了一些重要尺寸,做个备忘:

一、屏幕尺寸/启动图作图大小

型号 屏幕尺寸(inch) 屏幕密度(ppi) 屏幕宽高(pt) 屏幕分辨率(px) 倍图
iPhone 4/4S 3.5 326 320 * 480 640 * 960 @2x
iPhone 5/5C/5S/SE 4.0 326 320 * 568 640 * 1136 @2x
iPhone 6/6s/7/8/SE 2 4.7 326 375 * 667 750 * 1334 @2x
iPhone 6/6S/7/8 Plus 5.5 401 414 * 736 1242 * 2208 @3x
iPhone X / XS / 11 Pro 5.8 458 375 * 812 1125 * 2436 @3x
iPhone Xr / 11 6.1 326 414 * 896 828 * 1792 @2x
iPhone XS Max / 11 Pro Max 6.5 458 414 * 896 1242 * 2688 @3x
iPhone 12 mini 5.4 476 375 * 812 1125 * 2436 @3x
iPhone 12 / 12 Pro 6.1 460 390 * 844 1170 * 2532 @3x
iPhone 12 Pro Max 6.7 458 428 * 926 1284 * 2778 @3x
iPhone 13 mini 5.4 476 375 * 812 1125 * 2436 @3x
iPhone 13 / 13 Pro 6.1 460 390 * 844 1170 * 2532 @3x
iPhone 13 Pro Max 6.7 458 428 * 926 1284 * 2778 @3x
iPhone 14 6.1 460 375 * 812 1125 * 2436 @3x
iPhone 14 Plus 6.7 458 428 * 926 1284 * 2778 @3x
iPhone 14 Pro 6.1 460 393 * 852 1179 * 2556 @3x
iPhone 14 Pro Max 6.7 460 430 * 932 1290 * 2796 @3x

二、APP 桌面logo图片尺寸

标注 尺寸(px)
iPhone Notification 20pt @2x 40 * 40
iPhone Notification 20pt @3x 60 * 60
iPhone Settings 29pt @2x 58 * 58
iPhone Settings 29pt @3x 87 * 87
iPhone Spotlight 40pt @2x 80 * 80
iPhone Spotlight 40pt @3x 120 * 120
iPhone App 60pt @2x 120 * 120
iPhone App 60pt @3x 180 * 180
App Store 1024pt @1x 1024 * 1024

Xcode 14 不是说只需要一张 1024 吗,但我试着不太对,是我搞错了吗…😢

三、安全区

型号 Edge(Top, Left, Bottom, Right)
iPhone SE / 5S ——
iPhone 6s / 7 / 8 ——
iPhone 6 / 7 / 8 Plus ——
iPhone X / XS (44, 0, 34, 0)
iPhone Xr / 11 (48, 0, 34, 0)
iPhone XS Max / 11 Pro Max (44, 0, 34, 0)
iPhone 12 mini / 13mini (50, 0, 34, 0)
iPhone 12 / 12 Pro / 13 / 13 Pro (47, 0, 34, 0)
iPhone 12 Pro Max / 13 Pro Max (47, 0, 34, 0)
iPhone 14 (47, 0, 34, 0)
iPhone 14 Plus (47, 0, 34, 0)
iPhone 14 Pro (59, 0, 34, 0)
iPhone 14 Pro Max (59, 0, 34, 0)

四、Tabbar 作图大小

型号 尺寸(px) Tabbar 高度(pt)
iPhone SE / 5S 640 * 98 49
iPhone 6s / 7 / 8 750 * 98 49
iPhone 6 / 7 / 8 Plus 1242 * 147 49
iPhone X / XS 1125 * 249 83
iPhone Xr / 11 828 * 166 83
iPhone XS Max / 11 Pro Max 1242 * 249 83
iPhone 12 mini / 13mini 1080 * 249 83
iPhone 12 / 12 Pro / 13 / 13 Pro 1170 * 249 83
iPhone 12 Pro Max / 13 Pro Max 1284 * 249 83
iPhone 14 1170 * 249 83
iPhone 14 Plus 1284 * 249 83
iPhone 14 Pro 1179 * 249 83
iPhone 14 Pro Max 1290 * 249 83

五、硬件信息/设备名称

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
+ (NSString *)getDeviceString {
struct utsname systemInfo;
uname(&systemInfo);
NSString *platform = [NSString stringWithCString:systemInfo.machine encoding:NSASCIIStringEncoding];
NSDictionary *dic = @{
//iPhone
@"iPhone1,1" : @"iPhone 1G",
@"iPhone1,2" : @"iPhone 3G",
@"iPhone2,1" : @"iPhone 3GS",
@"iPhone3,1" : @"iPhone 4",
@"iPhone3,2" : @"iPhone 4",
@"iPhone3,3" : @"iPhone 4",
@"iPhone4,1" : @"iPhone 4S",
@"iPhone5,1" : @"iPhone 5",
@"iPhone5,2" : @"iPhone 5",
@"iPhone5,3" : @"iPhone 5C",
@"iPhone5,4" : @"iPhone 5C",
@"iPhone6,1" : @"iPhone 5S",
@"iPhone6,2" : @"iPhone 5S",
@"iPhone7,1" : @"iPhone 6 Plus",
@"iPhone7,2" : @"iPhone 6",
@"iPhone8,1" : @"iPhone 6S",
@"iPhone8,2" : @"iPhone 6s Plus",
@"iPhone8,4" : @"iPhone SE",
@"iPhone9,1" : @"iPhone 7",
@"iPhone9,3" : @"iPhone 7",
@"iPhone9,2" : @"iPhone 7 Plus",
@"iPhone9,4" : @"iPhone 7 Plus",
@"iPhone10,1" : @"iPhone 8",
@"iPhone10,4" : @"iPhone 8",
@"iPhone10,2" : @"iPhone 8 Plus",
@"iPhone10,5" : @"iPhone 8 Plus",
@"iPhone10,3" : @"iPhone X",
@"iPhone10,6" : @"iPhone X",
@"iPhone11,8" : @"iPhone XR",
@"iPhone11,2" : @"iPhone XS",
@"iPhone11,6" : @"iPhone XS Max",
@"iPhone11,4" : @"iPhone XS Max",
@"iPhone12,1" : @"iPhone 11",
@"iPhone12,3" : @"iPhone 11 Pro",
@"iPhone12,5" : @"iPhone 11 Pro Max",
@"iPhone12,8" : @"iPhone SE 2",
@"iPhone13,1" : @"iPhone 12 mini",
@"iPhone13,2" : @"iPhone 12",
@"iPhone13,3" : @"iPhone 12 Pro",
@"iPhone13,4" : @"iPhone 12 Pro Max",
@"iPhone14,4" : @"iPhone 13 mini",
@"iPhone14,5" : @"iPhone 13",
@"iPhone14,2" : @"iPhone 13 Pro",
@"iPhone14,3" : @"iPhone 13 Pro Max",
@"iPhone14,6" : @"iPhone SE 3",
@"iPhone14,7" : @"iPhone 14",
@"iPhone14,8" : @"iPhone 14 Plus",
@"iPhone15,2" : @"iPhone 14 Pro",
@"iPhone15,3" : @"iPhone 14 Pro Max"
};
if ([dic valueForKey:platform]) {
return [dic valueForKey:platform];
}else {
return platform;
}
}

FYI-参考地址:https://www.theiphonewiki.com/wiki/Models