I have array with image urls and I need to download all images, add all of them to array before passing to view.
I am using that snippet for downloading single image
var images: [UIImage] = []
ImageDownloader.default.downloadImage(with: URL(string: "http://abcd.com/image1.jpg")!, options: [], progressBlock: nil) {
(image, error, url, data) in
images.append(image!)
}
but this is only downloading 1 image. How can I download multiple images at same time and run callback after all of them finished ?