Running a synchronous method in a background thread is a great way of avoiding GUI seeming unresponsive to the user.

Getting a file example

Get a file

	//Get file on a background thread to stop GUI locking up
    dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
        NSData* data = [NSData dataWithContentsOfURL:[NSURL URLWithString:@"http://mydomain.com/comefile.php"]];
        [self performSelectorOnMainThread:@selector(fetchedData:)
							   withObject:data waitUntilDone:YES];
    });

 

File Received

//***********************************
//***********************************
//********** FILE RECEIVED **********
//***********************************
//***********************************
- (void)fetchedData:(NSData *)responseData
{

}