在WebView中添加定位功能
来源:互联网 发布:sql语句大全实例 编辑:程序博客网 时间:2024/05/31 19:19
1.导入头文件 #import< CoreLocation/CoreLocation.h>
2.在info.plist中设置配置
NSLocationWhenInUseDescription
NSLocationAlwaysUsageDescription
3.在webview需要定位的地方添加如下代码
@property (nonatomic, strong) CLLocationManager *locationMgr;
if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 8) {
//由于IOS8中定位的授权机制改变 需要进行手动授权 self.locationMgr = [[CLLocationManager alloc] init]; //获取授权认证 [self.locationMgr requestAlwaysAuthorization]; [self.locationMgr requestWhenInUseAuthorization]; }
0 0
- 在WebView中添加定位功能
- iOS8中webview添加定位功能
- WebView从assets中加载html5页面,实现定位功能
- 在ListView中添加item为WebView
- 在WebView 中添加一个背景图片
- android-webView 定位功能开启
- 在Menu中添加功能
- 添加wifi定位功能
- 添加wifi定位功能
- webview中图片加载,添加放大缩小功能
- ios 定位新功能----在程序中实现定位功能
- ios 定位新功能----在程序中实现定位功能
- 在blog中添加万年历功能
- 在桌面程序中添加GPS功能
- 在VC2010中添加预编译功能
- 在程序中添加Game Center功能
- 在状态栏中添加一个时钟功能
- 在网页中添加百度分享功能
- 一步一步在Windows中使用MyCat负载均衡 上篇
- Spring mvc和SSH如何取舍?
- 有关cocoaPods的一些坑
- PAT 乙级 1031. 查验身份证(15) Java版
- Altium Designer PCB导线高亮
- 在WebView中添加定位功能
- PAT A1091. Acute Stroke (30)
- E
- Windows下 solr6.4.1新建core
- genymotion的一种快速下载镜像的方法
- ReactNative中把js编译成bundle后,js引用的图片的去向
- 如何测试一个网页登陆界面
- extern “C”的用法
- java.sql.SQLException: Access denied for user 'ROOT'@'localhost' (using password: YES)