我在iOS 8.x.x中的MKMapView中遇到问题.应用程序工作正常iOS 7.x.x,但不在iOS 8.x.x中.在设备上,它只显示注释,但没有映射.
我试图强制重置我的设备,但没有运气.
我在info.plist中添加了这两个值,这是iOS 8及以上版本的要求
<key>NSLocationAlwaysUsageDescription</key> <string>Location is required to find out where you are</string> <key>NSLocationWhenInUseUsageDescription</key> <string>Location is required to find out where you are</string>
// Check for iOS 8. Without this guard the code will crash with "unknown selector" on iOS 7. if ([self.locationManager respondsToSelector:@selector(requestWhenInUseAuthorization)]) { [self.locationManager requestWhenInUseAuthorization]; //[self.locationManager requestAlwaysAuthorization]; self.myMapView.showsUserLocation = YES; }
通过在info.plist和上述代码行中添加这两个值,我可以在用户位置的地图上显示用户的位置和注释,但Map是Blank.