@interfaceDownloadDelegate:NSObject

-(void)connection:(NSURLConnection*)connection didReceiveResponse:(NSURLResponse*)response;

-(void)connection:(NSURLConnection*)connection didReceiveData:(NSData*)data;

@end

 

@implementationDownloadDelegate

-(void)connection:(NSURLConnection*)connection didReceiveResponse:(NSURLResponse*)response {

}

-(void)connection:(NSURLConnection*)connection didReceiveData:(NSData*)data {

}

@end

We use the delegate like so:

 

DownloadDelegate*dd =[DownloadDelegate alloc];

NSURLConnection*c2 =[[NSURLConnection alloc] initWithRequest:url delegate:dd];

相关文章:

  • 2021-07-28
  • 2021-08-16
  • 2022-12-23
  • 2022-12-23
  • 2021-07-02
  • 2022-03-07
  • 2022-12-23
猜你喜欢
  • 2021-11-20
  • 2021-06-11
  • 2022-12-23
  • 2022-02-24
  • 2021-10-29
  • 2022-12-23
  • 2022-02-27
相关资源
相似解决方案