Created
August 21, 2019 05:50
-
-
Save susanna2222/6af68059bd808429cbaf991430276996 to your computer and use it in GitHub Desktop.
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
func mapView(_ mapView: MKMapView, didUpdate userLocation: MKUserLocation) { | |
let span = MKCoordinateSpan(latitudeDelta: 0.001, longitudeDelta: 0.001) | |
let region = MKCoordinateRegion(center: userLocation.coordinate, span: span) | |
mapView.region = region | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment