Daily iOS
Concurrency

Canceling delayed work

You scheduled DispatchQueue.main.asyncAfter(deadline: .now() + 2) { showTooltip() }, and if the user leaves the screen within 2 seconds it has to be canceled. How would you do that with GCD?

Submit