当我们想给MKMapView添加拖动手势时,第一个想法多是这样:
- (void)viewDidLoad
{
//....
UIPanGestureRecognizer *panGesture = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(handlePan:)];
[self.mapView addGestureRecognizer:panGesture];
}
- (void)handlePan:(UIPanGestureRecognizer*) recognizer
{
NSLog("handlePan");
}
- (void)view