not saving when using setDidReceiveDataSelector
Posted
by
coder4xc
on Stack Overflow
See other posts from Stack Overflow
or by coder4xc
Published on 2012-10-08T09:05:30Z
Indexed on
2012/10/08
9:37 UTC
Read the original article
Hit count: 203
i want to download a file and show the progress bar
i was able to do this.
now , i want to show the progress value in a label and use this code to progress init and update label :
[queue setDelegate:self];
[queue setRequestDidFinishSelector:@selector(updateLabel)];
[queue setDownloadProgressDelegate:progress];
[queue setShowAccurateProgress:YES];
ASIHTTPRequest *request;
request = [ASIHTTPRequest requestWithURL:url];
[request setDelegate:self];
[request setTemporaryFileDownloadPath:[filePath stringByAppendingString:@".download"]];
[request setAllowResumeForFileDownloads:YES];
[request setDidFinishSelector:@selector(updateLabel)];
[request setDidReceiveDataSelector:@selector(updateLabel)];
[request setShouldContinueWhenAppEntersBackground:YES];
[request setShouldAttemptPersistentConnection:NO];
[request setDownloadDestinationPath:filePath];
[queue addOperation:request];
[queue go];
but not save in the destination path !
and when i clear this code :
[request setDidReceiveDataSelector:@selector(updateLabel)];
saving done !
what is problem ?
i want to update label text when progress value changed
© Stack Overflow or respective owner