Created
July 4, 2018 08:51
-
-
Save onmyway133/e381f351bc75744b7bebc193f934f26c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ViewModel { | |
func getFacebookFriends(completion: [User] -> Void) { | |
let client = APIClient() | |
client.getFacebookFriends(for: user) { friends in | |
DispatchQueue.main.async { | |
completion(friends) | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment