:
imageConnectionがタイプNSURLConnectionのプロパティです
#pragma mark -
#pragma mark Download support (NSURLConnectionDelegate)
- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data
{
[self.activeDownload appendData:data];
}
- (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error // Never called (deprecated method not used with IOS version >> 4.3 ???)
{
// Clear the activeDownload property to allow later attempts
self.activeDownload = nil;
// Release the connection now that it's finished
self.imageConnection = nil;
}
- (void)connectionDidFinishLoading:(NSURLConnection *)connection{
UIImage *image = [[UIImage alloc] initWithData:self.activeDownload];
self.activeDownload = nil;
// Release the connection now that it's finished
self.imageConnection = nil;
}
:
NSURLConnection *imageConnection
とactiveDownloadがNSMutableDataです:
NSMutableData *activeDownload
そこに私の解決策が見つかりました。ありがとう – user691285