SHARE
TWEET

Untitled

a guest Aug 14th, 2019 69 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. final class UserManager {
  2.    
  3.     var service: UserPhotoService
  4.    
  5.     init(service: UserPhotoService) {
  6.         self.service = service
  7.     }
  8.    
  9.     func fetchUserPhoto(by userId: String) {
  10.         service.fetchUserPhoto(by: userId) { (userPhoto, error) in
  11.             guard error == nil else {
  12.                 //SHOW ERROR ON VIEW
  13.                 return
  14.             }
  15.             //SHOW FETCH SUCCESS AND DISPLAY FETCHED PHOTO
  16.            
  17.         }
  18.     }
  19. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top