iPhone App- MkMapview get the range of area visible in map view
in ipohne app Using mapView how to detect the the range of area visible in mapview (i mean range of longitude and latitude which binds the total area)
and also when applying zoomin or zoomout in mapview, how to get notified that the range is changed with gest开发者_运维技巧ure controlled (Pinch gesture)?
Your MapView instance has a .region
property that you can use to find the currently displayed visible area (ie. self.mapView.region
).
The MKMapViewDelegate
class has events you can implement for the range change, but it's not tied to the pinch specifically - it's also fired if you double tap on the map (to zoom in).
- (void)mapView:(MKMapView *)mapView regionDidChangeAnimated:(BOOL)animated;
精彩评论