web定位处理
【一】、iOS8
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];
?????? }
?
【二】、安卓
http://blog.csdn.net/shuyou612/article/details/45310941
?
轉載于:https://www.cnblogs.com/superbobo/p/6878780.html
總結
- 上一篇: java程序发布成exe等
- 下一篇: js继承之借用构造函数继承