iOS-APP-Icon 图标启动图及名字的设置
Posted 星辰
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了iOS-APP-Icon 图标启动图及名字的设置相关的知识,希望对你有一定的参考价值。
本文讲下appIcon图标、启动图及名字的设置
icon for ios 图标大小参照苹果官网:
https://developer.apple.com/library/ios/qa/qa1686/_index.html
两种方法设置图片
1.使用默认方法
使用项目的 Images.xcassets:
首先,点击项目名,设置一下配置:

设置成这样之后,意思是使用使用的assets。去到 Images.xcassets,会发现多了一个AppIcon的文件夹,右边有20多个图标位,分别代表不同的手机屏幕系统需要用的的不同大小分辨率的图标,将准备好的图标拉到对应位置就可以了,需要注意的是要对应分辨率拖进去。
如果你懒得一个个做这么多的图标,可以单独做一张1024x1024px大小的png,then Use plugin: RTImageAssets
安装方法:使用插件管理软件安装(也可以单独在网上下载此插件安装)
1.plugins manager download address:http://alcatraz.io
2.How to Install:paste the following string to your terminal:
curl -fsSL https://raw.githubusercontent.com/supermarin/Alcatraz/deploy/Scripts/install.sh | sh
restart Xcode, it will be under the menu of window --open the package manager
Then search "RTImageAssets" on this manager‘s search bar and install it.
After finish,restart Xcode,it will be under menu file--ImageAssets. use and enjoy it.

同理,launchImage 图片也是如此设置,先在 Images.xcassets 左下角 的 “+” 号添加文件夹:

然后你会看到右边也有很多图片位置,按需求填充就可以了。

然后到项目设置里:设置从刚才建的那个文件夹获取资源就可以了

2.使用自定义方法:
在项目设置中设置:

成

然后在项目中新建一个文件夹字叫 icons 和 launchImages ,再将准备好的图标放里面。这样也是可以的。

###ps:其实发现什么都不设置,只要将一张图片重命名为: icon.png 放在项目中,commad + shift + K 清理下软件再重新运行发现已可以显示图标的。
设置App的名字
1.在项目的Info.plist 文件里面找到 Bundle display name 这一项,没有的话就添加:

然后输入键值就是它的名字了。
2.运行 terminal , cd 定位到项目位置后再定位到项目的Info.plist位置,并获得这个位置路径:然后执行命令:
defaults write /Users/用户名/项目位置/Info.plist NSdefaults write CFBundleDisplayName App名字
也可以更改App 的名字。
3.info.plist配置方法
上面两种方法都需要准备许多种尺寸的icon,因为要适应不同尺寸的屏幕,下面讲的是一种只用几张尺寸通过plist文件配置就好的方法:


以上是关于iOS-APP-Icon 图标启动图及名字的设置的主要内容,如果未能解决你的问题,请参考以下文章