Created
August 14, 2012 02:37
-
-
Save piaoapiao/3345864 to your computer and use it in GitHub Desktop.
下载一个文件进度显示
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:[[NSURL alloc]initWithString:@"http://pic10.nipic.com/20101103/3970232_071442037843_2.jpg"]]; | |
NSLog(@"path:%@",NSHomeDirectory()); | |
[request setDownloadDestinationPath:[NSHomeDirectory() stringByAppendingPathComponent:@"1.jpg" ]]; | |
request.delegate = self; | |
request.downloadProgressDelegate = self; | |
[request startAsynchronous]; | |
} | |
- (void)setProgress:(float)newProgress | |
{ | |
NSLog(@"progress:%f",newProgress); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment