* [[iOS]]/NSURLConnection [#n15e14d4] #author("2018-02-01T21:15:10+00:00","default:yusami","yusami") #contents &tag(iOS, NSURLConnection); &tag(iOS); ** Tips [#e0918b80] - Blocksを使うNSURLConnectionのイディオム (2012/2/10) [NSURLConnection sendAsynchronousRequest:request queue:[NSOperationQueue currentQueue] completionHandler:^(NSURLResponse *response, NSData *data, NSError *error){ if([(NSHTTPURLResponse*)response statusCode] == 200){ // do something here. dispatch_async(dispatch_get_main_queue(), ^{ // update UI here. }); } }];