【发布时间】:2017-05-06 11:23:10
【问题描述】:
我知道过去曾有人问过这个问题,但是我找不到适用于 swift 3 的解决方案。有人能指出我正确的方向吗?这是我的代码:
ref.child(uid).child("flights").observe(.value, with:{ (snapshot: FIRDataSnapshot!) -> Void in
self.messages.append(snapshot)
let row = [IndexPath(row: self.messages.count-1, section: 0) ]
print(snapshot)
self.flightTableView.insertRows(at: row, with: .automatic)
DispatchQueue.main.async {
self.flightTableView.reloadData()
}
})
}
【问题讨论】:
标签: firebase firebase-realtime-database swift3