You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Anyway to add the ability to have a download progress indicator for Fast Image Cache?
Right now there appears to be no way to do this from the wantsSourceImageForEntity call.
If you use any of the NSURLSessionDownloadDelegate's they have their own delegate calls for progress and a final didFinishDownloadingToURL which gives the image from the Server. From this delegate you can Manually set the image just downloaded, but now you have no way to force retrieveImageForEntity to fire off to now load the just downloaded image.
The only way I can get progress to work is to basically download the same image twice, one in the wantsSourceImageForEntity with a downloadTaskWithRequest:completionHandler, and the other with a downloadTaskWithRequest and then using the NSURLSessionDownloadDelegate
(void)URLSession:(NSURLSession *)session
downloadTask:(NSURLSessionDownloadTask *)downloadTask
didWriteData:(int64_t)bytesWritten
This works but it's not very good since your basically downloading the image twice.
totalBytesWritten:(int64_t)totalBytesWritten
totalBytesExpectedToWrite:(int64_t)totalBytesExpectedToWrite
The text was updated successfully, but these errors were encountered:
Anyway to add the ability to have a download progress indicator for Fast Image Cache?
Right now there appears to be no way to do this from the wantsSourceImageForEntity call.
If you use any of the NSURLSessionDownloadDelegate's they have their own delegate calls for progress and a final didFinishDownloadingToURL which gives the image from the Server. From this delegate you can Manually set the image just downloaded, but now you have no way to force retrieveImageForEntity to fire off to now load the just downloaded image.
The only way I can get progress to work is to basically download the same image twice, one in the wantsSourceImageForEntity with a downloadTaskWithRequest:completionHandler, and the other with a downloadTaskWithRequest and then using the NSURLSessionDownloadDelegate
downloadTask:(NSURLSessionDownloadTask *)downloadTask
didWriteData:(int64_t)bytesWritten
This works but it's not very good since your basically downloading the image twice.
totalBytesWritten:(int64_t)totalBytesWritten
totalBytesExpectedToWrite:(int64_t)totalBytesExpectedToWrite
The text was updated successfully, but these errors were encountered: