From 2294da777cf08f899dcc95256056e2c1958b8a88 Mon Sep 17 00:00:00 2001 From: Jiajie Zhu Date: Tue, 21 Apr 2015 10:19:18 -0700 Subject: [PATCH] [catlyst|madman] make map fire onRegionChange for user zoom in/out again --- React/Views/RCTMapManager.m | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/React/Views/RCTMapManager.m b/React/Views/RCTMapManager.m index 8de351415..f9a6b9175 100644 --- a/React/Views/RCTMapManager.m +++ b/React/Views/RCTMapManager.m @@ -67,15 +67,13 @@ RCT_CUSTOM_VIEW_PROPERTY(region, MKCoordinateRegion, RCTMap) { [self _regionChanged:mapView]; - if (animated) { - mapView.regionChangeObserveTimer = [NSTimer timerWithTimeInterval:RCTMapRegionChangeObserveInterval - target:self - selector:@selector(_onTick:) - userInfo:@{ RCTMapViewKey: mapView } - repeats:YES]; + mapView.regionChangeObserveTimer = [NSTimer timerWithTimeInterval:RCTMapRegionChangeObserveInterval + target:self + selector:@selector(_onTick:) + userInfo:@{ RCTMapViewKey: mapView } + repeats:YES]; - [[NSRunLoop mainRunLoop] addTimer:mapView.regionChangeObserveTimer forMode:NSRunLoopCommonModes]; - } + [[NSRunLoop mainRunLoop] addTimer:mapView.regionChangeObserveTimer forMode:NSRunLoopCommonModes]; } - (void)mapView:(RCTMap *)mapView regionDidChangeAnimated:(BOOL)animated