Вы можете добавить распознаватель жестов длинного нажатия на карту:
UILongPressGestureRecognizer* lpgr = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(handleLongPress:)];
lpgr.minimumPressDuration = 1.5;
lpgr.delegate = self;
[self.map addGestureRecognizer:lpgr];
[lpgr release];
В методе длинного нажатия дескриптора получите CLLocationCordinate2D:
- (void) handleLongPress:(UILongPressGestureRecognizer *)gestureRecognizer {
if (gestureRecognizer.state == UIGestureRecognizerStateBegan) {
/*
Only handle state as the touches began
set the location of the annotation
*/
CLLocationCoordinate2D coordinate = [self.map convertPoint:[gestureRecognizer locationInView:self.map] toCoordinateFromView:self.map];
[self.map setCenterCoordinate:coordinate animated:YES];
// Do anything else with the coordinate as you see fit in your application
}
}