Haneke / HanekeSwift

A lightweight generic cache for iOS written in Swift with extra love for images.
Apache License 2.0
5.21k stars 591 forks source link

How to get download progress? #216

Open CharlinFeng opened 9 years ago

CharlinFeng commented 9 years ago

I need to the progress of downloading, with the indicator, how can I get the download progress of the picture?

kapoorsahil commented 9 years ago

+1

ZAPHIT commented 9 years ago

Just create your own.. just study activity indicator using swift and integrate that..

bespalown commented 9 years ago

+1

michaelbina commented 8 years ago

I have a similar/related question:

I'm currently using the LoadingImageView library (https://github.com/ggamecrazy/LoadingImageView) to show a progress indicator before the images finish loading. I start off the process by calling:

func downloadImage(URL: NSURL, placeholder:UIImage?)->NSURLSessionDownloadTask

on the LoadingImageView object which kicks off the download and loads the image. Is there a good way to integrate this properly with this library and have the images be cached?

tavonkelly commented 8 years ago

+1

makhmutov commented 8 years ago

+1

thedodd commented 7 years ago

+1 it would definitely be pretty awesome to have a standard HanekeSwift API for registering a block to take progress reports or something of that nature. Think Alamofire .downloadProgress:

Alamofire.download("https://httpbin.org/image/png")
    .downloadProgress { progress in
        // Update your UI here, or something along those lines.
        print("Download Progress: \(progress.fractionCompleted)")
    }
   // ...
thedodd commented 7 years ago

Looks like this issue was closed, but the referenced issue above doesn't include any additional info and was also closed. Was some code merged which implements this?