From the course: Complete Guide to SwiftUI

Unlock this course with a free trial

Join today to access over 24,700 courses taught by industry experts.

SF Symbols animation, part 2

SF Symbols animation, part 2

- [Instructor] Discreet symbols, like bounce, rotate, and breathe, function once and then cease. There are other types of symbols as well. Indefinite and transition effects lack a built-in start and stop, requiring different handling approaches. Breathe is both the discreet and indefinite effect. By changing the modifier, we'll change its behavior. So we could go over here where we got to breathe and I'm going to change value here to isActive in your code. And so when isAnimating is true, it will breathe. And when animating is false, it won't breathe. And I can now go ahead and try that in my code and tap the animate button. And you can see that what it's doing is breathing back and forth. And it'll continue to do this as long as it's true. It goes false, it stops. Now I'm going to go ahead and cut and paste this, and put that on 3 person so we can see it a little better. And then go ahead and try that again. And notice what happens. You can actually see that there's changes in the…

Contents