Set Minimum Zoom Level For MKMapView in iOS

2.5k Views Asked by At

I want to set minimum and maximum Pinch-In and Pinch-Out Zoomming Level For MKMapview. so user not Pinch after specific Level Of MKMapview Zooming.Currently I am using MKMapView+ZoomLevel Category Class to restrict Zoom-In and Out effect of MapView.

Code:-

- (void)mapView:(MKMapView *)mapView regionDidChangeAnimated:(BOOL)animated {

 if([self.mapView zoomLevel]<17) {

  CLLocationCoordinate2D centerCoord = {latitude, longitude};
        [self.mapView setCenterCoordinate:centerCoord zoomLevel:17 animated:NO];
}
}  
0

There are 0 best solutions below