찾다

 >  Q&A  >  본문

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

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

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

大家讲道理大家讲道理2893일 전409

모든 응답(2)나는 대답할 것이다

  • PHP中文网

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

    (AVGeoPoint!,NSError!) -> Void) 이를 위해서는 함수를 전달해야 하며 익명 함수(클로저)를 직접 사용할 수 있습니다.
    { (point, error) -> > 으아악

    }

    회신하다
    0
  • 迷茫

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

    이 방법은 시스템 전체에 적용됩니까? AVGeoPoint.geoPointForCurrentLocationInBackground

    이렇게 작성한 매개변수가 함수 포인터입니다

    회신하다
    0
  • 취소회신하다