首页 > 代码库 > MKMapViewDelegate

MKMapViewDelegate

Responding to Map Position Changes

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

 

Loading the Map Data

- (void)mapViewWillStartLoadingMap:(MKMapView *)mapView- (void)mapViewDidFinishLoadingMap:(MKMapView *)mapView- (void)mapViewDidFailLoadingMap:(MKMapView *)mapView withError:(NSError *)error- (void)mapViewWillStartRenderingMap:(MKMapView *)mapView- (void)mapViewDidFinishRenderingMap:(MKMapView *)mapView fullyRendered:(BOOL)fullyRendered

 

Tracking the User Location

- (void)mapViewWillStartLocatingUser:(MKMapView *)mapView- (void)mapViewDidStopLocatingUser:(MKMapView *)mapView- (void)mapView:(MKMapView *)mapView didUpdateUserLocation:(MKUserLocation *)userLocation- (void)mapView:(MKMapView *)mapView didFailToLocateUserWithError:(NSError *)error- (void)mapView:(MKMapView *)mapView didChangeUserTrackingMode:(MKUserTrackingMode)mode animated:(BOOL)animated

 

Managing Annotation Views

- (MKAnnotationView *)mapView:(MKMapView *)mapView viewForAnnotation:(id<MKAnnotation>)annotation- (void)mapView:(MKMapView *)mapView didAddAnnotationViews:(NSArray *)views- (void)mapView:(MKMapView *)mapView annotationView:(MKAnnotationView *)view calloutAccessoryControlTapped:(UIControl *)control

 

Dragging an Annotation View

- (void)mapView:(MKMapView *)mapView annotationView:(MKAnnotationView *)annotationViewdidChangeDragState:(MKAnnotationViewDragState)newState fromOldState:(MKAnnotationViewDragState)oldState

 

Selecting Annotation Views

- (void)mapView:(MKMapView *)mapView didSelectAnnotationView:(MKAnnotationView *)view- (void)mapView:(MKMapView *)mapView didDeselectAnnotationView:(MKAnnotationView *)view

 

Managing the Display of Overlays

- (MKOverlayRenderer *)mapView:(MKMapView *)mapView rendererForOverlay:(id<MKOverlay>)overlay- (void)mapView:(MKMapView *)mapView didAddOverlayRenderers:(NSArray *)renderers- (MKOverlayView *)mapView:(MKMapView *)mapView viewForOverlay:(id<MKOverlay>)overlay- (void)mapView:(MKMapView *)mapView didAddOverlayViews:(NSArray *)overlayViews

 

MKMapViewDelegate