0
我想用firebase一次观察多个数据,观察块保持循环直到它获取所有数据。我需要知道它何时完成,以便我可以执行另一个块。我怎样才能做到这一点?我需要知道什么时候完成Firebase观察
databaseRef.child("First_Secondary_Grade").child("0").child("0").queryOrderedByKey().observe(.childAdded, with: {
(snapshot) in
if let dictoinary = snapshot.value as? [String: AnyObject] {
let dataofthequsation = structofthedata()
dataofthequsation.setValuesForKeys(dictoinary)
}
})
如果您经过测试,它可以工作,您可以接受自己的答案。 –
我会感谢你! –