ios - AVgepoint.geopointForCurrentLocationInBackground( )括号里的参数怎么写?
大家讲道理
大家讲道理 2017-04-17 17:56:54
0
2
398

var point = AVGeoPoint.geoPointForCurrentLocationInBackground( ((AVGeoPoint!,NSError!) -> Void)!)
query.limit = 30
query,wherKey("location",nearGeopoint:point,withinKilometers:20)

其中括号中的 ((AVGeoPoint!,NSError!) -> Void)! 是出现的提示代码,求问括号里的参数具体应该怎么写?

大家讲道理
大家讲道理

光阴似箭催人老,日月如移越少年。

reply all(2)
Ty80

(AVGeoPoint!, NSError!) -> Void) This requires you to pass a function in, you can directly use an anonymous function (closure)
{ (point, error) -> Void in

    //数据处理

}

迷茫

Is this method system-wide? AVGeoPoint.geoPointForCurrentLocationInBackground

The parameter written like this is a function pointer

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template