ios - FireStore Data getting and storing it in an array
问题描述
I am fetching data from Cloud Firestore and I don't know hot to get the name and imageURl from the data I fetched.
Here is the code:
func getFireBaseData(){
db.collection("categories").getDocuments() { (querySnapshot, err) in
if let err = err {
print("Error getting documents: \(err.localizedDescription)")
} else {
for document in querySnapshot!.documents {
self.categoryDictionary.append(document.data())
}
self.tableVu.reloadData()
}
}
}
解决方案
推荐阅读
- javascript - Vuejs - 如何避免在 v-if 中输入数字
- javascript - 如何在不刷新 2 个或多个用户页面之间的页面的情况下获取数据
- git - Batch file : git checkout branch using variables
- java - 使用递归打印帕斯卡三角形
- powerpoint - Powerpoint 2010 无法插入页脚
- javascript - 在 ReactJs 中使用 If/Else 语句返回一个组件
- java - 用于共享点在线服务的 Java NTLM 身份验证出现 401 错误
- html - 预期的“to”或“from”文本阴影
- r - 自定义调色板,从 colorspace::choose_palette() 向导中提取函数
- android - 如何使用 react native 从多个类中重用 android 设备后退按钮处理程序组件?