Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Database.database().reference().child("rooms").child(self.matchGameMode).child(self.matchGender).child(self.matchAge).observeSingleEvent(of: DataEventType.value) { (snapshot) in
- print("1")
- if let snapshot = snapshot.children.allObjects as? [DataSnapshot] {
- print("2")
- for snap in snapshot {
- print("3")
- if let postDict = snap.value as? [String: AnyObject] {
- print("4")
- let post = postDict
- self.rooms.insert(post as NSDictionary, at: 0)
- print("OKay")
- print(self.matchGameMode)
- print(self.matchGender)
- print(self.matchAge)
- print("= Dictionary (self.rooms)")
- }
- }
- }
- }
- let when = DispatchTime.now() + 2
- DispatchQueue.main.asyncAfter(deadline: when, execute: {
- print("=== Dictionary (self.rooms)")
- })
- }
Add Comment
Please, Sign In to add comment