问题
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...
回答1:
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
来源:https://stackoverflow.com/questions/7468557/rotate-mkmapview-in-iphone-application