error Domain = kCLErrorDomain Code = 0"(null)" IOS 9.3

时间:2016-07-23 16:33:24

标签: ios location mapkit

我已尝试在产品中设置默认位置 - >方案 - >允许当前位置设置。

func locationManager(manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) {
    let location: CLLocation = locations.first!
    self.mapView.centerCoordinate = location.coordinate
    let reg = MKCoordinateRegionMakeWithDistance(location.coordinate, 1500, 1500)
    self.mapView.setRegion(reg, animated: true)
    geoCode(location)


}

func locationManager(manager: CLLocationManager, didFailWithError error: NSError) {
    print(error)
}

0 个答案:

没有答案