How to animate the replacement of an SF Symbol using UIKit

Oscar de la Hera Gomez
Two flowers that represent Swift and XCode side by side with the text "SF Symbols Animated Replacement" beneath them.

Use the code below to perform an animation when switching between SF Symbols.

Please note that this article assumes that you have already added an SF symbol to a Swift project. If you have not done so, please consult the tutorial linked below.

To perform an animated replacement use code similar to the one below, replacing INSERT_SF_SYMBOL_NAME with the name of the SF Symbol (i.e. square.and.arrow.up, chevron.right or plus).

Frequently Asked Questions (FAQ)

How do I animate symbols using SwiftUI ?

Consult the WWDC session Animate symbols in your app to learn how to animate SF symbols in SwiftUI.

To learn more about what's available in SF Symbols consult What's new in SF Symbols 5.

How do I add symbol effects in UIKit?

To add SF Symbol effects such as bounce, consult the article linked below:

Any Questions?

We are actively looking for feedback on how to improve this resource. Please send us a note to inquiries@delasign.com with any thoughts or feedback you may have.
delasign logo

Book a Free Consultation.

An icon of an email.

Click here to email us.

Fill in the details below to book a free consultation or to let us know about something else. Whatever it is, we are here to help.

How can we help you ?

Contact Details