Advertisement
Guest User

Untitled

a guest
Aug 14th, 2019
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  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. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement