* [[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.
                              });
                          }
                      }];

トップ   編集 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS