Guest User

Untitled

a guest
Jun 24th, 2018
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. firstly {
  2. UIApplication.shared.isNetworkActivityIndicatorVisible = true
  3. return fetch(url: <backendURL>)
  4. }.then { imageurl in
  5. return downloadImage(url: imageurl)
  6. }.then { data in
  7. imageView.image = UIImage(data: data)
  8. }.ensure {
  9. UIApplication.shared.isNetworkActivityIndicatorVisible = false
  10. }.catch { error in
  11. // in case we have an error
  12. }
Add Comment
Please, Sign In to add comment