MKMapView one finger zoom in and out

Google Maps has had this for a while (double tap and hold and slide your finger up or down to zoom in or out), but Apple is just adding it to its Apple Maps app in iOS 11.

It doesn't look like they will add this in MKMapView

, at least not in the current beta releases.

If Apple doesn't provide MKMapView

this functionality, how would you do it using gestures? Has anyone else done this?

+3


source to share


1 answer


This will help you scale down to world class.



// step.1 create co-ordianate-span as follows
MKCoordinateSpan span = {.latitudeDelta = 180, .longitudeDelta = 360};

// step.2 crate region as follows
MKCoordinateRegion region = MKCoordinateRegionMake(CLLocationCoordinate2DMake(0.0000f, 0.0000f), span);

// step.3 zoom using region to map as follows
[self.mapView setRegion:region animated:YES];

      

-1


source







All Articles