2

I am attempting to disable zooming and scrolling on an instance of MKMapView and get it to respond to a touch up inside event (or similar). The accepted answer on the question linked below uses a gesture recognizer added to the map view to respond to taps but these happen immediately and are often triggered when scrolling past the MKMapView. This is not the desired behavior.

How to intercept touches events on a MKMapView or UIWebView objects?

What is the best way to allow an instance of MKMapView to respond to touch up inside events?

Community
  • 1
  • 1
markdorison
  • 139,374
  • 27
  • 55
  • 71

1 Answers1

1

There may be a solution related to gesture recognizers but I discovered a much simpler solution after a suggestion from a friend. I placed a UIButton on top of the MKMapView and set it's type to "Custom". This causes the button to become instantly transparent. Hook it up to an IBAction of your choosing and all is right with the world.

markdorison
  • 139,374
  • 27
  • 55
  • 71