I am working on a tap counter app and I need a sound to be played every thousand clicks but I could not figure out how to play it after multiple clicks in swift. If possible could someone please provide the code necessary to do so. It would be very helpful.
Set a variable as a counter = 0. Increment that counter (+= operator) every time the button is pressed. Also check to see if if counter == 1000, and if so, play MP3 and reset counter to zero.