我正在使用apple的mapkit框架制作应用程序.我想要做的是从你按的位置获取经度和纬度.我使用以下代码从用户当前位置获取坐标:
- (IBAction)longpressToGetLocation:(id)sender {
CLLocationCoordinate2D location = [[[self.mapView userLocation] location] coordinate];
NSLog(@"Location found from Map: %f %f",location.latitude,location.longitude);
}
Run Code Online (Sandbox Code Playgroud)
如何让代码显示按下的位置而不是userlocation?