Hey guys I have a few questions relating to SwiftUI in Xcode
how do I restart a timer when it finishes in SwiftUI
When the timer finishes, it just remains at 0 and does not reset back to 60 seconds (the time originally set) does anyone know how to fix this
how to code it in SwiftUI so that as soon as the app opens music can start playing?
I am creating this game in SwiftUI and I want it to be that as soon as the user opens the app on their device, music should start playing. Any ideas on how to do this ??
I put a timer in my code and when there are 12 seconds left I am playing this background music to alert the user they have 12 seconds remaining. However, when they click a button, the song immediately stops so I am not sure how to make this song play in the background for the 12 seconds without stopping irrespective of what the user does.
Any help on any of the above questions would be much appreciated