回调函数调用不了

来源:5-1 使用Core Location

慕虎7025927

2017-05-17 20:12

回调函数调用不了

写回答 关注

2回答

  • 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

    检查你设置了代理没?

Swift Weather APP

本课程将带领大家使用Swift语言开发一个完整的天气 iOS APP

35555 学习 · 241 问题

查看课程