how to check an dispatch_async block has finished running
问题 So basically I need to be able to run a segue after a block has finished running. I have a block which does some JSON stuff and I need to know when that has finished running. I have a queue which I have called json_queue. jsonQueue = dispatch_queue_create("com.jaboston.jsonQueue", NULL); I then have a dispatch_async block with this syntax: dispatch_async(jsonQueue, ^{ [self doSomeJSON]; [self performSegueWithIdentifier:@"modaltomenu" sender:self]; }); It wont let me perform the line: "[self