Я создаю приложение, используя фреймворк apple mapkit. Я хочу сделать, чтобы получить долготу и широту от того места, которое вы нажимаете. Я получаю координаты от текущего местоположения пользователей, используя этот код:
- (IBAction)longpressToGetLocation:(id)sender {
CLLocationCoordinate2D location = [[[self.mapView userLocation] location] coordinate];
NSLog(@"Location found from Map: %f %f",location.latitude,location.longitude);
}
Как мне получить этот код, чтобы отображать нажатое местоположение вместо userlocation?