デリゲート メソッドは、リクエストの対応する NSURLConnection で呼び出されます。
urlConnection = [[NSURLConnection alloc] initWithRequest:request delegate:self startImmediately:YES];
その後、次のように、完了したコールバックを含むさまざまなコールバックを受け取ります。
- (void)connectionDidFinishLoading:(NSURLConnection *)connection{}
その他のデリゲート コールバックは次のとおりです。
- (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error
- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data{
- (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response {
- (BOOL)connectionShouldUseCredentialStorage:(NSURLConnection *)connection{
- (void)connection:(NSURLConnection *)connection didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge {