|
I have a VStack with 4 buttons(potential answers in a multiple choice quiz). See below for the code. Currently, when the user clicks on the button containing the correct answer, the old text animates into the new text. What I want is not that only the text animates, but the whole button. ie. the button animates off screen to the left, and 4 new buttons animate on screen from the right. I tried adding a .transition(.move(.leading) modifer to the vstack of the button. that worked partly. The buttons now animate on and off screen to the left side. But that is not what I want. I want that the "old" buttons move away to the left, and that the new buttons move on from the right. Anybody any sugestions on how to do that? Thx! The
I also use this view for other buttons. Therefore I have the useText and text variables. The code for displaying the 4 buttons:
|
|
|
|
|
|
|
|
Thanks @roosterboy , i was facing the same issue and its worked efectively. Robert TennisUnit |
SPONSORED Join a FREE crash course for mid/senior iOS devs who want to achieve an expert level of technical and practical skills – it’s the fast track to being a complete senior developer! Hurry up because it'll be available only until February 9th.
Sponsor Hacking with Swift and reach the world's largest Swift community!
This topic has been closed due to inactivity, so you can't reply. Please create a new topic if you need to.
All interactions here are governed by our code of conduct.
Link copied to your pasteboard.