Last active
August 21, 2019 05:48
-
-
Save susanna2222/98609decc7d84455c71c8a1ba8a576a8 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
override func viewDidLoad() { | |
super.viewDidLoad() | |
// setup Map View on User Location | |
let noLocation = CLLocationCoordinate2D() | |
let span = MKCoordinateSpan(latitudeDelta: 0.001, longitudeDelta: 0.001) | |
let viewRegion = MKCoordinateRegion(center: noLocation, span: span) | |
mapView.delegate = self | |
mapView.region = viewRegion | |
mapView.showsUserLocation = true | |
mapView.userTrackingMode = .follow | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment