سؤال

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

هل كانت مفيدة؟

المحلول

[mapView setUserTrackingMode:MKUserTrackingModeFollowWithHeading];
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top