From 57f0d6535cf4ce99aab1383ebef10341762f5104 Mon Sep 17 00:00:00 2001 From: Jason Wray Date: Fri, 31 Jul 2015 15:59:57 -0400 Subject: [PATCH] Document iOS region change delegate methods With #1026 the region delegate methods work reliably and as expected. This commit adds `mapView:regionWillChangeAnimated:`, `mapViewRegionIsChanging:`, and `mapView:regionDidChangeAnimated:` to the official documentation. --- include/mbgl/ios/MGLMapView.h | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/include/mbgl/ios/MGLMapView.h b/include/mbgl/ios/MGLMapView.h index 4b21d5bad..b8ea4ee7f 100644 --- a/include/mbgl/ios/MGLMapView.h +++ b/include/mbgl/ios/MGLMapView.h @@ -414,13 +414,22 @@ IB_DESIGNABLE // Responding to Map Position Changes -// TODO +/** Tells the delegate that the region displayed by the map view is about to change. + * + * This method is called whenever the currently displayed map region will start changing. + * @param animated Whether the change will cause an animated effect on the map. */ - (void)mapView:(MGLMapView *)mapView regionWillChangeAnimated:(BOOL)animated; -// TODO +/** Tells the delegate that the region displayed by the map view is changing. + * + * This method is called whenever the currently displayed map region changes. During movement, this method may be called many times to report updates to the map position. Therefore, your implementation of this method should be as lightweight as possible to avoid affecting performance. + * @param mapView The map view whose visible region is changing. */ - (void)mapViewRegionIsChanging:(MGLMapView *)mapView; -// TODO +/** Tells the delegate that the region displayed by the map view just changed. + * + * This method is called whenever the currently displayed map region has finished changing. + * @param animated Whether the change caused an animated effect on the map. */ - (void)mapView:(MGLMapView *)mapView regionDidChangeAnimated:(BOOL)animated; #pragma mark - Loading the Map Data