I have a button that centers the map and sets the region based on the user's current location and then sets the user tracking mode to follow. I am following the user while moving and if they move the map or zoom out it sets the user tracking mode to none.
This is what I have
guard let currentLocation = locationManager.location else { return }
let coordinateRegion = MKCoordinateRegion(center: currentLocation.coordinate,
latitudinalMeters: regionRadius,
longitudinalMeters: regionRadius)
map.setRegion(coordinateRegion, animated: true)
map.setUserTrackingMode(MKUserTrackingMode.follow, animated: true)
It successfully sets the region back to the user's current location and then the user tracking mode to follow but for some reason it doesn't follow anymore.