iOS | 您所在的位置:网站首页 › iosapp图标不显示 › iOS |
本文讲下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.io2.How to Install:paste the following string to your terminal: curl -fsSL https://raw.githubusercontent.com/supermarin/Alcatraz/deploy/Scripts/install.sh | shrestart Xcode, it will be under the menu of window --open the package managerThen 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 左下角 的 “+” 号添加文件夹: ![]() 然后你会看到右边也有很多图片位置,按需求填充就可以了。 ![]() 然后到项目设置里:设置从刚才建的那个文件夹获取资源就可以了 ![]() 在项目设置中设置: ![]() 成 ![]() 然后在项目中新建一个文件夹字叫 icons 和 launchImages ,再将准备好的图标放里面。这样也是可以的。 ![]() 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文件配置就好的方法: ![]() ![]() |
CopyRight 2018-2019 实验室设备网 版权所有 |