自iOS 10.3起以编程方式更改iOS应用程序图标

网友投稿 869 2022-10-19

自iOS 10.3起以编程方式更改iOS应用程序图标

自iOS 10.3起以编程方式更改iOS应用程序图标

AlternativeIcon

Since iOS 10.3, it is possible to change the application's icon programmatically. This repository contains simple application demo it.

Screenshot

Requirements

Xcode 8.3 or higher.iOS 10.3 or higher.

How to build.

Install cocoapods (if needed) .Clone this project.Redirect to /Project directory.pod install.Open AlternativeIconExample.xcworkspace with Xcode.Build and run on your device or simulator.

Alternate icon, step by step

Import your alternative icon files to project file.IMPORTANT I don't know why, but it doesn't support .xcassets. Open your project's Info.plist file. CFBundleIcons CFBundleAlternateIcons {alternate-icon-key} CFBundleIconFiles {alternate-icon-file-name} UIPrerenderedIcon CFBundlePrimaryIcon CFBundleIconFiles {primary-icon-file-name} UIPrerenderedIcon Write some code to set alternative icon. UIApplication.shared.setAlternateIconName("alternative-icon-key") { error in // Handle error or do something. }

Before submit to App Store.

The icon must to be user-choosable.The icon must to be related to your app.Click here to show more details.

Used libraries.

AddWithThenSnapKit

License

AlternativeIcon-Example is available under the MIT license. See the LICENSE file for more info.

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:springboot实现返回文件流
下一篇:【Tableau 图表大全2.0】之堆叠条形图
相关文章

 发表评论

暂时没有评论,来抢沙发吧~