Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to put MKMapView in compass mode?

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

I have read about "compass mode".
Perhaps I need to set the MKMapView property of compassMode to be true. But I can not find any check box for such an option in the properties of the MKMapView.

So how do I enable compass mode for my mapview?
Is there no check box for turning this on.
Btw,. I even watched the 46 minute video at developer.apple.com

"Visualizing information geographically with MapKit".
This video demonstrated an app that worked in such a compass mode. But I never saw any explanation of how to make it work like that. Any suggestions would be great. -jd

like image 771
John Dorsey Avatar asked Mar 14 '13 12:03

John Dorsey


1 Answers

[mapView setUserTrackingMode:MKUserTrackingModeFollowWithHeading];
like image 154
Craig Avatar answered Sep 28 '22 19:09

Craig