Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2019
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. yourref.observeSingleEvent(of: .value, with: { (snapshot) in
  2.  
  3. let value = snapshot.value as? NSDictionary
  4. let useremail = value?["Sender"] as? String ?? ""
  5. if useremail == "aa@bb.com"{
  6. //your local variable num
  7. num = num + value?["Number"] as? Int ?? 0
  8. }
  9. // ...
  10. }) { (error) in
  11. print(error.localizedDescription)
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement