How to use NSURLDownload
Posted
by marshluca
on Stack Overflow
See other posts from Stack Overflow
or by marshluca
Published on 2010-03-23T02:20:52Z
Indexed on
2010/03/23
2:41 UTC
Read the original article
Hit count: 363
objective-c
|nsurlconnection
- (IBAction)startDownloadingURL:(id)sender
{
// create the request
NSURLRequest *theRequest=[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://www.apple.com/index.html"] cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:60.0];
// create the connection with the request
// and start loading the data
NSURLDownload *theDownload=[[NSURLDownload alloc] initWithRequest:theRequest delegate:self];
if (!theDownload) {
// inform the user that the download could not be made
}
}
when i run the simulator , i got an error:
NSURLDownload undeclared ,first use in this fuction.
where can i import the library of NSURLDownload.
© Stack Overflow or respective owner