旋转MKMapView的内容 [英] Rotate the content of a MKMapView
本文介绍了旋转MKMapView的内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要根据罗盘值旋转mapView的内容:
I need to rotate the content of the mapView according to the compass value:
float myHeadingValue = 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?
推荐答案
我是解决了它在Interface Builder中创建一个较小的UIView并将MKMapView放入其中。新的UIView没有显示剩余的地图。
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.
这篇关于旋转MKMapView的内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文