我有个问题。我在dispatch_async
. 但是在callMethod2
不同的对象中,我正在使用[NSURLConnection sendAsynchronousRequest
. 但是上传后,它没有显示我的响应。(但是,当我在没有 dispatch_async 的情况下调用 callMethod2 时,效果很好)。问题可能出在哪里?
dispatch_async(dispatch_get_global_queue( DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^(void){
[offline callMethod1];
[offline callMethod2];
});
上传图片
[NSURLConnection sendAsynchronousRequest:request queue:[NSOperationQueue currentQueue] completionHandler:^(NSURLResponse *response, NSData *data, NSError *error) {
NSLog("Never show me me this log");
}];