Swift - 使用CoreLocation实现定位(经纬度、海拔、速度、距离等)
(1)在 info.plist里加入定位描述(Value值为空也可以): NSLocationWhenInUseDescription :允许在前台获取GPS的描述 NSLocationAlwaysUsageDescription :允许在后台获取GPS的描述 (2)代码如下:import UIKitimport CoreLocationclass ViewController: UI
转载
2016-04-06 10:12:06 ·
1126 阅读 ·
0 评论