-
-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow implementors to add custom TapGestures
The current MLNMapView supports implementers adding their own TapGesture, and even documents how: ```swift let mapTapGestureRecognizer = UITapGestureRecognizer(target: self, action: #selector(myCustomFunction)) for recognizer in mapView.gestureRecognizers! where recognizer is UITapGestureRecognizer { mapTapGestureRecognizer.require(toFail: recognizer) } mapView.addGestureRecognizer(mapTapGestureRecognizer) ``` Unfortunately this doesn't work with NavigationMapView, which has a catch-all tap gesture the greedily consumes all taps. With this change, we will fail the gesture unless the NavigationMapView intends to handle it. Unfortunately this presents some redundant work, but I've rearranged things so that the redundant work only occurs in the case that the user has successfully selected a Route or WayPoint.
- Loading branch information
1 parent
0d7cd71
commit ef73edf
Showing
1 changed file
with
51 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters