Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- final class UserManager {
- var service: UserPhotoService
- init(service: UserPhotoService) {
- self.service = service
- }
- func fetchUserPhoto(by userId: String) {
- service.fetchUserPhoto(by: userId) { (userPhoto, error) in
- guard error == nil else {
- //SHOW ERROR ON VIEW
- return
- }
- //SHOW FETCH SUCCESS AND DISPLAY FETCHED PHOTO
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement