I am trying to simply show user\'s location on the map, but I need to when app launches, the map should zoom to current location ,but I don\'t know why map doesn\'t zoom at all
Try with MKMapViewDelegate func:
var isInitiallyZoomedToUserLocation: Bool = false func mapView(_ mapView: MKMapView, didUpdate userLocation: MKUserLocation) { if !isInitiallyZoomedToUserLocation { isInitiallyZoomedToUserLocation = true mapView.showAnnotations([userLocation], animated: true) } }