Would love the answer to this question https://devforums.apple.com/message/723468 . I canβt publish the data because it is approximately on iOS 6 and is confidential to Apple.
Please post your answers / comments on the Apple Dev forum and let me know here.
EDIT: from the official release of iOS6:
In my pre-ios6 code, I do this to rotate the map when the userβs location moves:
//this is in my MKMapViewDelegate -(void) rotateMap:(MKMapView *)mapViewTmp forLocation:(MKUserLocation *) userLocation { ... //calculate needed rotation ... [mapViewTmp setTransform:CGAffineTransformMakeRotation(lastRotation)]; //rotate the MKMapView for (id<MKAnnotation> annotation in mapViewTmp.annotations) { MKAnnotationView* annotationView =[mapViewTmp viewForAnnotation:annotation]; [annotationView setTransform:CGAffineTransformMakeRotation(-lastRotation)]; //counter rotate the Annotation Views [annotationView setNeedsDisplay]; //ios6 } }
And it works great (1000 users).
However, in ios6 (I updated Xcode / sdk on 9/4/2012), annotations do not support this rotation (for example, if the card is enabled). They lean back into the unarmed state (which, since my card is rotated, means that they display text at an angle instead of horizontally).
The code temporarily rotates the annotations, so their text is displayed horizontally, but if the map is tinted (and it seems they are also other reasons), the annotations are turned into their non-rotatable state, and my annotation text appears at an angle relative to the rotational display.
What is the correct way to rotate MKAnnotationView so that it rotates in iOS6? What has changed in MKMapView that caused the change?
source share