[lang=objc]
- (void)locationManager:(CLLocationManager *)manager
didUpdateToLocation:(CLLocation *)newLocation
fromLocation:(CLLocation *)oldLocation
{
NSLog(@"test");
CLLocationCoordinate2D loc = [newLocation coordinate];
lat = loc.latitude;//get latitude
lon= loc.longitude;//get longitude
}
[/lang]获取当前经纬度方法
最新推荐文章于 2024-05-21 17:04:51 发布
本文探讨了Objective-C与Swift两种编程语言在iOS开发领域的应用与对比,介绍了它们各自的特点、优缺点及在实际项目中的使用场景。

1175

被折叠的 条评论
为什么被折叠?



