Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private func fetchUser(withId uid: String) {
- FIRDatabase.database().reference().child("users").child(uid).observeSingleEvent(of: .value, with: { (snapshot) in
- if let dictionary = snapshot.value as? [String: AnyObject] {
- let user = User()
- user.name = dictionary["name"] as? String
- user.profileImageUrl = dictionary["profileImageURL"] as? String
- self.users.append(user)
- self.attemptReloadOfCollection()
- }
- }, withCancel: nil)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement