【发布时间】:2016-05-26 18:53:03
【问题描述】:
我正在使用 Geofire 来存储项目及其位置。
为了检索特定区域内的项目,我使用 Geofire 的地理查询:
var queryHandle = query.observeEventType(.KeyEntered, withBlock: {(key: String!, location: CLLocation!) in
println("Key '\(key)' entered the search area and is at location '\(location)'")
})
正如预期的那样,结果是指定区域中的键 - 我的问题是:我如何获取实际对象以便访问它具有的其余属性?
我将所有这些都作为 UITableView 的一部分,因为我想在表格中(以及稍后在地图上)呈现我附近的对象
任何使用 geofire 填充 UITableView 的最佳实践都将受到赞赏。
谢谢!
【问题讨论】:
-
通常带有firebase.google.com/docs/database/ios/… 的循环。在这里阅读我的回答,了解为什么它不像你可能的那么慢:stackoverflow.com/questions/35931526/…
标签: swift uitableview firebase geofire