Fully execute function before next tap?


I noticed in Day 1 in the ‘add Labels’ function that if I tap in quick succession, the first label will animate, but the second will only show up once the first animation has run its course.

What would be the simplest way of making sure that the whole function gets executed before the app responds to the next tap?


Different ways of doing it…you could disable the taprecongnizer while the animation is on for example.
I would probably create a new var, something like : var isItDone: Bool = true
then in your tap function first check - if isItDone == true { then do you tap function… }
Then in the start of the tap fucntion you do : isItDone = false , after the animation you do isItDone = true …


Thanks, that sounds like a good solution.