I can't figure out how to get the map to zoom in on the user location from viewDidLoad. I tried setting a region, and that didn't work. This is the code I have, any tips?
@IBOutlet weak var mapView: MKMapView! var MapViewLocationManager:CLLocationManager! = CLLocationManager() var currentLocation: PFGeoPoint! = PFGeoPoint()
override func viewDidLoad() {
super.viewDidLoad()
self.mapView.showsUserLocation = true
mapView.delegate = self
MapViewLocationManager.delegate = self
mapView.setUserTrackingMode(MKUserTrackingMode.Follow, animated: true)
}
I have looked up the answers for this question but haven't found the answer in Swift or that actually works. Thanks!!