GCD

Keeping it to the main thread

You probably know that UIKit is not┬áthread safe, so for instance if you want to display an alert following a network request you need to make sure that it runs on the main thread. Most developers will resort to dispatch_async to help them with that. – (void)showErrorMessage { dispatch_async(dispatch_get_main_queue(), ^{ [[[UIAlertView alloc] initWithTitle:nil message:@"Something's wrong"…