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

Great Product, Great Team, and Great Support Service. And if you want to add more features to the product, they can submit any idea that comes to your mind. They really care about their clients and we are really happy and honored to deal with Webkul.

Osama
Talk to Sales

Global

Live Chat
Start a Project


    Message Sent!

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

    Back to Home