【发布时间】:2020-02-18 15:05:12
【问题描述】:
我正在尝试通过 GeoFire 查找用户,由于某种原因,此语法不适用于我....
func findUsers () {
guard let userLat = userDefault.value(forKey: "current_location_latitude") as? String, let userLong = userDefault.value(forKey: "current_location_longitude") as? String else {return}
let location: CLLocation = CLLocation(latitude: CLLocationDegrees(Double(userLat)!), longitude: CLLocationDegrees(Double(userLong)!))
myQuery = geoFire.query(at: location, withRadius: distance)
---> ** myQuery.observe(GFEventType.keyEntered) { (key, location) ** in
print(key)
}
}
给我一个“模糊使用'观察者'”的错误
【问题讨论】:
标签: jquery ios swift observers geofire