I have a problem. I call some method in dispatch_async
. But in callMethod2
in different object I am uploading image with [NSURLConnection sendAsynchronousRequest
. But after upload, It doesn't show me response. (However when I call callMethod2 without dispatch_async, it works great). Where can be the problem?
dispatch_async(dispatch_get_global_queue( DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^(void){
[offline callMethod1];
[offline callMethod2];
});
Upload image
[NSURLConnection sendAsynchronousRequest:request queue:[NSOperationQueue currentQueue] completionHandler:^(NSURLResponse *response, NSData *data, NSError *error) {
NSLog("Never show me me this log");
}];