Maison > Questions et réponses > le corps du texte
var point = AVGeoPoint.geoPointForCurrentLocationInBackground( ((AVGeoPoint!,NSError!) -> Void)!)
query.limit = 30
query,wherKey("location",nearGeopoint:point,withinKilometers:20)
其中括号中的 ((AVGeoPoint!,NSError!) -> Void)! 是出现的提示代码,求问括号里的参数具体应该怎么写?
PHP中文网2017-04-17 17:58:54
(AVGeoPoint!,NSError!) -> Void) Cela nécessite que vous passiez une fonction, vous pouvez directement utiliser une fonction anonyme (fermeture)
{ (point, erreur) -> >
//数据处理
}迷茫2017-04-17 17:58:54
Cette méthode s'applique-t-elle à l'ensemble du système ? AVGeoPoint.geoPointForCurrentLocationInBackground
Le paramètre écrit ainsi est un pointeur de fonction