Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- firstly {
- UIApplication.shared.isNetworkActivityIndicatorVisible = true
- return fetch(url: <backendURL>)
- }.then { imageurl in
- return downloadImage(url: imageurl)
- }.then { data in
- imageView.image = UIImage(data: data)
- }.ensure {
- UIApplication.shared.isNetworkActivityIndicatorVisible = false
- }.catch { error in
- // in case we have an error
- }
Add Comment
Please, Sign In to add comment