Mehul Mistri
Mehul Mistri

Reputation: 15147

Rotate MKMapView in iPhone application

I do not want any code but want to get reference for MKMapView compass rotation as shown in http://vimeo.com/7970239.

Can anyone tell me that is it possible or not?

Please help me to solve this problem..

Thanks in advance...

Upvotes: 0

Views: 1955

Answers (1)

Fran Sevillano
Fran Sevillano

Reputation: 8163

It is certainly possible, here is the very line that makes it work:

[self.map setTransform:CGAffineTransformMakeRotation(-1 * newHeading.magneticHeading * M_PI / 180)];

In order to receive the heading events, you need to create a CLLocationManager and do [locationManager startUpdatingHeading];

Hope it helps you

Upvotes: 2

Related Questions