ios8以前系統地圖定位不好用了,
ios8要使用地圖定位,需要設置
第一步,在info.plist表中添加兩個字段
NSLocationAlwaysUsageDescription<喎?/kf/ware/vc/" target="_blank" class="keylink">vcD4KPHA+TlNMb2NhdGlvbldoZW5JblVzZVVzYWdlRGVzY3JpcHRpb248L3A+CjxwPiA8L3A+CjxwPiA8L3A+CjxwPrXatv6yvaO61rG909PDtdrI/be9v/K83ElOVFVMb2NhdGlvbk1hbmFnZXI8L3A+CjxwIGFsaWduPQ=="left">INTULocationManager *mgr = [INTULocationManagersharedInstance];
if (mgr.locationServicesAvailable == NO) {
return;
}
// 請求位置
[mgr requestLocationWithDesiredAccuracy:INTULocationAccuracyCitytimeout:10.0block:^(CLLocation *currentLocation, INTULocationAccuracy achievedAccuracy, INTULocationStatus status) {
if (status == INTULocationStatusSuccess) { // 請求成功
NSLog(@"ddddddd%f %f", currentLocation.coordinate.latitude, currentLocation.coordinate.longitude);
}
}];
這樣就能使用地圖,不論手機的系統是ios幾都可以用了