GCD Dispatched Operation Not Running When App is Placed in Background
问题 I launch a method that is, essentially, an endless loop using dispatch_queue_create and then dispatch_async (and then the code-loop is inside the dispatched block). The loop runs perfectly. However, when the application gets backgrounded, it pauses. Then it restarts when the app takes the foreground. How can I prevent this from happening? I've been looking here but it seems that the priority is not one of the things I can choose. 回答1: Use the -[UIApplication