DispatchQueue.main.asyncAfter(deadline: .now() + 10) { //code }
code within asyncAfter will get executed after 10 seconds. Is there a way to cancel execution before 10 seconds
DispatchQueue.main.asyncAfter(deadline: .now() + 10) { //code }
code within asyncAfter will get executed after 10 seconds. Is there a way to cancel execution before 10 seconds