From the course: Complete Guide to SwiftUI

Unlock this course with a free trial

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

Replace effects

Replace effects

- [Instructor] Our last effect are the transition effects. There are four major transition effects: scale, appear, disappear, and replace. The first three of these work on a single symbol where you might want to change the symbol due to conditions of other symbols. For example, pencil, circle, slash does not exist. I might hide the slash button when circle is active. So let's go down to the slash button here and I'll put a symbol effect here and the effect is going to be disappear. Do it when it is active and it is circle. All right, now, when I push this button, you see that it disappears when I use a circle 'cause I don't have that option anyway. It also leaves the perfect space, so it's not changing any of these things as if it were to disappear on me. So I keep my layout very nice and neat. Now, I can use other things here too. For example, there's one called scale and it has an up and a down. I'm going to use the down here to make it look inactive because I've shrunken it. So I'm…

Contents