扫码关注官方订阅号
如题,获取当前的经纬度,只要经纬度数据,不需要mapView
走同样的路,发现不同的人生
使用CLLocationManager这个类
CLLocationManager
实现代理方法
- (void)locationManager:(CLLocationManager *)manager didUpdateLocations:(NSArray *)locations { CLLocation *location = [locations lastObject]; CLLocationDegrees latitude = location.coordinate.latitude; CLLocationDegrees longitude = location.coordinate.longitude; //some code }
微信扫码关注PHP中文网服务号
QQ扫码加入技术交流群
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
PHP学习
技术支持
返回顶部
使用
CLLocationManager这个类实现代理方法