搜尋

首頁  >  問答  >  主體

ios - AVgepoint.geopointForCurrentLocationInBackground( )括号里的参数怎么写?

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

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

大家讲道理大家讲道理2894 天前412

全部回覆(2)我來回復

  • PHP中文网

    PHP中文网2017-04-17 17:58:54

    (AVGeoPoint!,NSError!) -> Void) 這是需要你傳一個函數進去,可以直接用匿名函數(閉包)
    { (point, error) -> Void in

        //数据处理

    }

    回覆
    0
  • 迷茫

    迷茫2017-04-17 17:58:54

    請問這個方法是系統的嗎 AVGeoPoint.geoPointForCurrentLocationInBackground

    這樣寫參數是一個函數指標

    回覆
    0
  • 取消回覆