注意:iOS所有图标的圆角效果由系统生成,给到的图标本身不能是圆角的。
1. 桌面图标 (app icon)
- for iPhone6 plus(@3x) : 180 x 180
- for iPhone 6/5s/5/4s/4(@2x) : 120 x 120
2. 系统搜索框图标 (Spotlight search results icon)
- for iPhone6 plus(@3x) : 120 x 120
- for iPhone6/5s/5/4s/4(@2x) : 80 x 80
3. 系统设置图标 (Settings icon)
- for iPhone6 plus(@3x) : 87 x 87
- for iPhone6/5s/5/4s/4(@2x) : 58 x 58
4. 启动图片 (launch image)
- for iPhoen5s/5(@2x) : 640 x 1136
-
for iPhoen4s/4(@2x) : 640 x 960
iPhone6/iPhone6 plus 建议使用 launch file 或 storyboard ;如果依然想使用图片,尺寸数值为:
-
for iPhone 6(@2x) : 750 x 1334
- for iPhone 6 plus (@3x) : 1242 x 2208
5. 另一种根据iOS系统的分类法
Spotlight
-
iOS 5,6
base: 29pt, 需要 @1x, @2x, @3x,得出:29 x 29, 58 x 58, 87 x 87
-
iOS 7,8
base: 40pt, 需要 @2x, @3x,得出:80 x 80, 120 x 120
iPhone App
-
iOS 5,6
base: 57pt,需要 @1x, @2x, 得出:57 x 57, 114 x 114
-
iOS 7,8
base: 60pt,需要 @2x, @3x,得出:120 x 120, 180 x 180
Settings
-
iOS 5,6,7,8
base: 29pt,需要 @1x,@2x,@3x,得出:29 x 29, 58x58, 87x87
6. 尺寸总结:
图标尺寸输出列表:
- 180x180
- 120x120
- 87x87
- 80x80
- 58x58
- 57x57
- 29x29
启动图片尺寸输出列表:
- 640x960
- 640x1136
- 750x1334
- 1242x2208
Launch Image方式应该是最常用的方式,首先需要新建一个Launch Image,如下图所示:
2.修改支持的设置和机器类型,针对不同的屏幕的给出不同的尺寸:
3.iOS7/iOS8需要用到的尺寸,iPhone6p的1242x2208,或者1080x1920(Retina HD 5.5);iPhone6的750x1334(Retina HD 4.7)4寸屏(iPhone5/5s)的640x1136(Retina 4),3.5寸(iPhone4/4s)的640x960,就是2x;
如果你对屏幕的尺寸不是很清楚的话可以参考苹果官方文档https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/MobileHIG/IconMatrix.html#//apple_ref/doc/uid/TP40006556-CH27-SW1
5.最后一步设置,需要在通用设置里面选中LaunchImage,同时将LaunchScreen设置为空:
本文地址:http://www.cnblogs.com/xiaofeixiang/
LaunchScreen 方式
LaucnScreen.xib就比较比较简单了,直接在xib中设置,比如添加一个ImageView,设置背景图片,效果如下:
图片设置如下:
3x是1080*1920(iPhone6p),Retina 4 2x是640*1136(iPhone5s),2x尺寸750*1334(iPhone6),iPhone4s用的也是2x;
==================华丽分割线==================
再说说如何控制启动画面的时间和什么时候消失。
如果要简单的延时显示一下呢,就在AppDelegate.m的didFinishLaunchingWithOptions函数里延时一下:
- - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
- {
- // Override point for customization after application launch.
- [NSThread sleepForTimeInterval:3.0]; //让启动画面显示久一点
- return YES;
- }