As we saw in the previous section, combining both animations and transitions needn't be a headache. Yet, in addition to the basic approach, SwiftUI also gives us some alternative options to work with, allowing for more creativity in how we handle not only transitions on their own, but also alongside our existing animation options.
Advanced transitions
Asymmetric transitions
Asymmetric transitions are a way of adding and removing views based on their current state without the need for additional or duplicated logic.
Let's take a look at our previous example and see how we would achieve this:
Button("Basic Transitions") {
withAnimation {
self.transition.toggle()
}
}
if transition {
Text("...