How I can center the map on user's location in swift?
问题 I'm writing an app and I have an embedded mapview to show user's his location. This is my code so far: class YourCurrentLocation: UIViewController, CLLocationManagerDelegate { @IBOutlet weak var mapView: MKMapView! var locationManager = CLLocationManager() let regionRadius: CLLocationDistance = 1000 func checkLocationAuthorizationStatus() { if CLLocationManager.authorizationStatus() == .AuthorizedWhenInUse { mapView.showsUserLocation = true centerMapOnLocation(locationManager.location!, map: