title: Custom double tap to zoom in MKMapView (Uber like)
body: <p>I'm trying to achieve the same effect as the Uber app when double tapping on a MKMapView.</p>
  
  <p>It wouldn't zoom on the point where the user tapped, but on the current center of the map.</p>
  
  <p>Here's what I've tried so far :</p>
  
  <ul>
  <li>Removing the original double tap gesture recognizer</li>
  <li>Adding my own gesture recognizer that handles zooming on its own</li>
  </ul>
  
  <p>However, even if removing the original double tap gesture recognizer seems to work, my new gesture recognizer selector isn't fired.</p>
  
  <pre><code>- (void)viewDidLoad
  {
      [self removeDefaultDoubleTapToZoomGestureRecognizer];
      [self addCustomDoubleTapToZoomGestureRecognizer];
  }
  
  - (void)removeDefaultDoubleTapToZoomGestureRecognizer
  {
      [self findAndRemoveDefaultDoubleTapToZoomInView:self.map];
  }
  
  - (void)findAndRemoveDefaultDoubleTapToZoomInView:(UIView *)view
  {
      NSArray *gestureRecognizers = view.gestureRecognizers;
      for (UIGestureRecognizer *gestureRecognizer in gestureRecognizers)
      {
          if ([gestureRecognizer isKindOfClass:[UITapGestureRecognizer class]])
          {
              UITapGestureRecognizer *tapGestureRecognizer = (UITapGestureRecognizer *)gestureRecognizer;
              if (tapGestureRecognizer.numberOfTapsRequired == 2 &amp;&amp; tapGestureRecognizer.numberOfTouchesRequired == 1)
              {
                  [view removeGestureRecognizer:tapGestureRecognizer];
              }
          }
      }
  
      for (UIView *subView in view.subviews)
      {
          [self findAndRemoveDefaultDoubleTapToZoomInView:subView];
      }
  }
  
  - (void)addCustomDoubleTapRecognizer
  {
      UIView *view = self.mapView;
      UITapGestureRecognizer *gestureRecognizer = self.customDoubleTapGestureRecognizer;
  
      [view addGestureRecognizer:gestureRecognizer];
  }
  
  - (IBAction)customDoubleTapGestureRecognizerTapped:(UITapGestureRecognizer *)sender
  {
      NSLog(@"double tap");
  }
  </code></pre>
  
  <p>The <code>customDoubleTapGestureRegonizer</code> property and <code>-customDoubleTapGestureRecognizerTapped:</code> method have been added from IB.</p>
  
  <p>Any help is would be appreciated.</p>