In Apple's Maps app, when UserTrackingModeFollowWithHeading
is enabled, there is a compass image that shows the direction of North-South and rotates with the rotation of the map. I have enabled UserTrackingModeFollowWithHeading
in my app and would also like to show such a compass image.
I have tried to add a UIImageView
with a compass image as a Subview of MKMapView
but the image does not rotate with the map. Is there a way that I can make it rotate with the rotation of the map?
I know that I can manually rotate the map using UpdatedHeading and rotate the compass image with the map. This works. But I would rather use Apple's UserTrackingModeFollowWithHeading. I tried to use UserTrackingModeFollowWithHeading
and UpdatedHeading
together (where I rotate the compass image manually in UpdatedHeading) but this causes problems; the app crashes after a minute or so because of some conflict in using these two functions simultaneously.
Many Thanks for any help. I am using Monotouch 6.2 (but can translate any Objective C code in the responses provided to Monotouch).