|
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 Transform your career with the iOS Lead Essentials. Unlock over 40 hours of expert training, mentorship, and community support to secure your place among the best devs. Click for early access to this limited offer and a FREE crash course.
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.