小编Jia*_*vin的帖子

如何旋转MKMapView并保持Annotation和视图不旋转?

我正在制作一个显示用户当前位置的MKMapView.我想像Google Maps App一样旋转地图而不旋转注释.我使用以下代码

-(void) locationManager:(CLLocationManager *)manager didUpdateHeading:(CLHeading *)newHeading{
     mapView.transform=CGAffineTransformMakeRotation(-1*newHeading.magneticHeading*3.14159/180)};
Run Code Online (Sandbox Code Playgroud)

但整个视图像这个图像一样旋转. 我的应用程序中的问题的图像

iphone annotations rotation mkmapview

3
推荐指数
1
解决办法
4106
查看次数

标签 统计

annotations ×1

iphone ×1

mkmapview ×1

rotation ×1