Timer in another thread in Objective - C
问题 I have to define method which should be invoked periodically with some time interval. I need to invoke it in another thread (NOT main thread), because this method is used to get information from external API and sync data in core data. How do I define this method to not block main thread? 回答1: Unless you have a specific need for timers, you can use Grand Central Dispatch. The following snippet will execute a block after 2 seconds, on the default priority concurrent queue (i.e a background