开发者

Rotate the content of a MKMapView

I need to rotate the content of the mapView according to the compass value:

float myHeadi开发者_StackOverflowngValue = newHeading.trueHeading;

and for rotating the map I use this:

[mapView setTransform:CGAffineTransformMakeRotation( [self degreesToRadians:myHeadingValue] )];

but it rotates the view, not the content of the view.

How can I make it to rotate the content, not the whole view?


There may be an issue with the google logo being out of shot doing this though. Apple have contacted me to say that my app contravened the guidelines because the google logo was invisible.


I've solved it creating in Interface Builder a smaller UIView and putting the MKMapView into it. The new UIView does not show the leftover map.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜