I am trying to add a transition to a button but without using the .toggle()
or withAnimation
The way that I manage the hide and show the button its with incrementing myValue.
var body: some View{
ZStack{
if(myValue>0){ //the way that I hide and show the button
Button {
} label: {
HStack{
Text("Button")
}
}
}
}
}
How I can show and hide the Button with transition? This is not a replicate, every answer uses withAnimation or .toggle().