'Is it possible to create MKUserLocation programmatically?

I tried to do it this way, but this is wrong.

let meMarkerDot = MKUserLocation()
meMarkerDot.coordinate = location.coordinate  //Cannot assign to property: 'coordinate' is immutable
mapView.addAnnotation(meMarkerDot)

My task is to show both native MapView's User Location (blue dot), and to react on long tap. On long tap the Blue Dot must be set to pointed position (for ten seconds).

I know I can just disable showsUserLocation and mimic MKUserLocation by general annotation, but I wonder, could I use native blue dot annotation or not?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source