Xcode6,iOS8,百度地图不能正常显示,显示空白
来源:互联网 发布:java无参方法构造 编辑:程序博客网 时间:2024/05/01 16:12
1.在info.plist中加入:
NSLocationAlwaysUsageDescription=YES
NSLocationWhenInUseUsageDescription=YES
2.在调用百度SDK定位之前,先运行如下代码:
if ([[UIDevice currentDevice].systemVersion floatValue] >= 8) {
//由于IOS8中定位的授权机制改变 需要进行手动授权
CLLocationManager *locationManager = [[CLLocationManager alloc] init];
//获取授权认证
[locationManager requestAlwaysAuthorization];
[locationManager requestWhenInUseAuthorization];
}
这样可以解决大多数时的问题. 但是有些机型还是有问题.
NSLocationAlwaysUsageDescription=YES
NSLocationWhenInUseUsageDescription=YES
2.在调用百度SDK定位之前,先运行如下代码:
if ([[UIDevice currentDevice].systemVersion floatValue] >= 8) {
//由于IOS8中定位的授权机制改变 需要进行手动授权
CLLocationManager *locationManager = [[CLLocationManager alloc] init];
//获取授权认证
[locationManager requestAlwaysAuthorization];
[locationManager requestWhenInUseAuthorization];
}
这样可以解决大多数时的问题. 但是有些机型还是有问题.
0 0
- Xcode6,iOS8,百度地图不能正常显示,显示空白
- IOS 百度地图不能正常显示
- IOS百度地图开发系列-百度地图不能正常显示
- IOS百度地图开发系列-百度地图不能正常显示
- IOS百度地图开发系列-百度地图不能正常显示
- IOS SDK百度地图不能正常显示,只显示网格
- 打包的安装包不能正常显示百度地图解决办法
- IE下iframe不能正常加载,显示空白
- IE下iframe不能正常加载,显示空白
- 含有百度地图的签名包,无法正常显示地图
- 百度地图显示空白(只有格子)的解决方法
- iOS8.1 Xcode6.1环境下,模拟器不能正常运行
- 百度地图-----显示地图
- [android] 百度地图开发 (一).申请AK显示地图及解决显示空白网格问题
- 百度地图第一次调用正常,第二次调用显示不完整
- ClassView 不能正常显示
- 解决不能正常显示
- 图标不能正常显示
- windowManager LayoutParams 上
- Apache shiro集群实现 (五)分布式集群系统下的高可用session解决方案
- An problem about date(数学 )
- Android Application的作用
- 非常方便的shell脚本opencv编译以及gdb调试
- Xcode6,iOS8,百度地图不能正常显示,显示空白
- 我的学习之旅 keyboard.h和keyboard.c
- Android一键锁屏程序实例
- 杭电 HDU 1215 七夕节
- Protocol Layers in Computer Network
- oc 的第四天
- .Net自定义控件之INamingContainer接口详解
- Using Objective-C achieve the stack structure.(用Objective-C实现堆栈)
- UVA - 12589(learning vector dp)