Read More
Read now

How to change App icon runtime in Swift

Save

iOS 10.3 finally gave developers the ability to change their app’s icon programmatically, although it takes a little work to set up. In Apple’s UIApplication API document, there are 3 things worth a glance:

Follow the steps to change the App Icon.

Step 1:

Create @2x & @3x image for App Icon.

 

Step 2: 

The actual code to change your app’s icon is trivial, but first, there’s some setup work because you must declare all possible icons in your Info.plist file. The process behind this is far from optimal, and right now the best thing to do is edit your Info.plist as XML rather than trying to use the built-in property list editor in Xcode.

Step 3:

Add a Method to change the image Icon.

Step 4:

Now call the changeIcon method from any event.

Hope the above blog will help you to change the App icon in runtime in iOS using swift.

. . .

Leave a Comment

Your email address will not be published. Required fields are marked*


Be the first to comment.

css.php

Big thanks to Webkul and his team for helping get Opencart 3.0.3.7 release ready!

Deniel Kerr

Owner and Founder. Opencart

Talk to Sales
Start a Project

    Message Sent!

    If you have more details or questions, you can reply to the received confirmation email.

    Back to Home