Use blocks - it would be easier to handle:
[NSURLConnection sendAsynchronousRequest:request
queue:[[NSOperationQueue alloc] init]
completionHandler:^(NSURLResponse *response,
NSData *data,
NSError *error)
{
if ([data length] >0 && error == nil) {
// parse your data here
[self method3];
dispatch_async(dispatch_get_main_queue(), ^{
// call method on main thread, which can be used to update UI stuffs
[self updateUIOnMainThread];
});
}
else if (error != nil) {
// show an error
}
}];