有两种委托方法可以改变地图区域:
- (void)mapView:(MKMapView *)mapView regionDidChangeAnimated:(BOOL)animated
- (void)mapView:(MKMapView *)mapView regionWillChangeAnimated:(BOOL)动画
我的问题是:
有没有办法检测地图区域是从双击或缩放更改?
答案 0 :(得分:0)
您可以使用手势识别器检测双击:
UITapGestureRecognizer *recognizer = [[UITapGestureRecognizer alloc]
initWithTarget:self action:@selector(handleDoubleTap:)];
recognizer.numberOfTapsRequired = 2;
[self addGestureRecognizer:recognizer];
并使用UIPinchGestureRecognizer