iOS Swift - Animations
What will be the visible effect of this SwiftUI code?
struct ContentView: View {
@State private var showText = false
var body: some View {
VStack {
if showText {
Text("Welcome")
.transition(.opacity)
}
Button("Toggle") {
withAnimation {
showText.toggle()
}
}
}
}
}