问答详情
源自:5-1 使用Core Location

回调函数调用不了

回调函数调用不了

提问者:慕虎7025927 2017-05-17 20:12

个回答

  • qq_书上说_0
    2017-06-28 11:30:56

    我的也是出不来,

     func locationManager(_ manager: CLLocationManager, didUpdateLocations locations: [CLLocation])

        {

            let location:CLLocation = locations[locations.count - 1] as CLLocation


            if (location.horizontalAccuracy > 0) {

                print(location.coordinate.latitude)

                print(location.coordinate.longitude)

                locationManager.stopUpdatingLocation()

            }

        }


    现在代理方法换成这个了,但是没执行进来,而且权限询问也不跳出来,关于privcy 我也设置了


  • 坏小子16
    2017-06-20 16:01:34

    检查你设置了代理没?