How to put MKMapView in compass mode?

I placed MKMapView on my .xib.
It works fine, but do I need the map to rotate according to the compass heading?

I read about "compass mode".
Maybe I need to set the MKMapView compassMode property to true. But I can not check the box for this option in the MKMapView properties.

So, how do I enable compass mode for my display?
There is no flag to enable this.
Btw ,. I even watched a 46 minute video on developer.apple.com

"Visualizing information geographically using MapKit."
This video demonstrated an application working in this compass mode. But I have never seen an explanation of how to make it work like that. Any suggestions would be great. -jd

+4
source share
1 answer
[mapView setUserTrackingMode:MKUserTrackingModeFollowWithHeading]; 
+11
source

Source: https://habr.com/ru/post/1469235/


All Articles