看来您不能再使用用户的两指手势来旋转地图视图了。自从我进行任何 iOS 开发以来已经有一段时间了,但在 ios6 之前它是自动启用的。
是这种情况还是我很可笑?在我看来,对于开发人员来说,允许他们的用户旋转地图是一个非常基本的要求。
任何明确说明我们不能轮换或澄清的文档链接将不胜感激。
尝试使用 UIRotationGestureRecognizer 旋转地图。以下代码将对您有所帮助。
UIRotationGestureRecognizer *rgrr = [[UIRotationGestureRecognizer alloc] initWithTarget:self action:@selector(rotateMap:)];
[mapView addGestureRecognizer:rgrr];//mapView -->your mapview
rgrr.delegate = self;
////////
- (void) rotateMap:(UIRotationGestureRecognizer *)gestureRecognizer{
gestureRecognizer.view.transform = CGAffineTransformRotate(gestureRecognizer.view.transform, gestureRecognizer.rotation);
gestureRecognizer.rotation = 0; }