I don’t know if I am putting this question in the right place. I am not a developer but am coding in swift / SwiftUI more as a hobby, on an iPad using Swift Playgrounds.
I am coding a basic drum machine and trying to get start stop buttons functioning.
My loops are in functions. I have a start and stop button. The start button runs the drum loops. The drum loops are infinite so when I want to stop I want to pass a Boolean (true/false) variable from the stop button to interact with the while loop in the function. However once I have tapped the start button and the loop starts running, the stop button is unavaillable - it can’t be tapped. The start button has a pressed in appearance and also can’t be tapped.
if any one wanted to look at the code I could paste it here, or an abbreviated version to show the relevant part of my code.