DevTechie
Published in

DevTechie

Animation in SwiftUI

Photo by Julian Hochgesang on Unsplash

SwiftUI animation is as simple as adding any other modifier in SwiftUI.

There are only two things required to perform animation

  1. a trigger: an event which can start the animation
  2. change: this can be a variable tied to a view’s property

Lets see an example of change in property without animation and then with animation:

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store