Borrombombolla
Borrombombolla

Reputation: 33

How to change orientation of iOS map while the user moves?

I’ve been checking on the internet and could not find the solution to my problem, even it seems a really simple thing.

I’m implementing a simple iOS app that tracks the user location in a map, by using Mapkit framework.

Everything is fine, but I cannot find how to make the map automatically rotate while user moves. I want the map to point to the user direction instead of pointing to the north, as it does in the iOS Maps application after calibrating process.

Any idea will be very very very appreciated, because I feel a bit lost. Thanks!

Upvotes: 0

Views: 552

Answers (1)

rickster
rickster

Reputation: 126127

See the userTrackingMode property on MKMapView. As the docs note, FollowWithHeading is the one that rotates the map.

Upvotes: 1

Related Questions