cancel dispatch_after() method? [duplicate]
问题 This question already has answers here : Prevent dispatch_after() background task from being executed (10 answers) Closed 4 years ago . Is there a way to cancel dispatch_after() scheduled for some time in future, and haven't fired so far? I'm trying to make something like a scheduler for updates from server, and this method is just like I want, but, I'd love to cancel and re-schedule it at some point. Is it possible at all or I have to fallback and use NSTimer? 回答1: There is NO way to prevent