You can use the send queue block to achieve this here is the syntax
You can create your own private queue like this
dispatch_queue_t queue = dispatch_queue_create("com.MyApp.AppTask",NULL); dispatch_queue_t main = dispatch_get_main_queue(); dispatch_async(queue, ^{
Apple called it recursive decomposition.
In this bit of code, the calculation is uploaded to the background thread using dispatch_async() and
then dispatch_async() return to the main queue, which will schedule our block to run with the updated data that we calculated in the background thread.
source share