Created
December 11, 2018 14:40
-
-
Save pofat/441fc74a047a95bc3bf30ba12513f4d0 to your computer and use it in GitHub Desktop.
How to detect the first drag after map is loaded
This file contains hidden or 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
| class MapViewController: UIViewController { | |
| var isLoaded = false | |
| } | |
| extension MapViewController: MKMapViewDelegate { | |
| func mapViewDidChangeVisibleRegion(_ mapView: MKMapView) { | |
| if isLoaded { | |
| mapDidDrag() | |
| } | |
| } | |
| func mapViewDidFinishLoadingMap(_ mapView: MKMapView) { | |
| isLoaded = true | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment