Sometimes network image doest not download and for that app may crash . To avoid this you can use SDWebImage library as like Picasso android library which will show a default placeholder image until file downloaded .
To implement SDWebImage –
Step 1 :
paste the pod file in podfile of your project (If you don’t create pod file . create it with ‘pod init’ command in your project directory)
pod 'SDWebImage', '~> 4.0'
Step 2 :
Attach your image view
let image_url = "your_image_url" image_view.sd_setImage(with: URL(string: image_url ), placeholderImage: UIImage(named: "AppIcon"))
image_view is your ImageView reference . AppIcon is default placeholder .
Run your . Done .