mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-27 19:25:11 +08:00
[catlyst|madman] make map fire onRegionChange for user zoom in/out again
This commit is contained in:
@@ -67,15 +67,13 @@ RCT_CUSTOM_VIEW_PROPERTY(region, MKCoordinateRegion, RCTMap)
|
|||||||
{
|
{
|
||||||
[self _regionChanged:mapView];
|
[self _regionChanged:mapView];
|
||||||
|
|
||||||
if (animated) {
|
mapView.regionChangeObserveTimer = [NSTimer timerWithTimeInterval:RCTMapRegionChangeObserveInterval
|
||||||
mapView.regionChangeObserveTimer = [NSTimer timerWithTimeInterval:RCTMapRegionChangeObserveInterval
|
target:self
|
||||||
target:self
|
selector:@selector(_onTick:)
|
||||||
selector:@selector(_onTick:)
|
userInfo:@{ RCTMapViewKey: mapView }
|
||||||
userInfo:@{ RCTMapViewKey: mapView }
|
repeats:YES];
|
||||||
repeats:YES];
|
|
||||||
|
|
||||||
[[NSRunLoop mainRunLoop] addTimer:mapView.regionChangeObserveTimer forMode:NSRunLoopCommonModes];
|
[[NSRunLoop mainRunLoop] addTimer:mapView.regionChangeObserveTimer forMode:NSRunLoopCommonModes];
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)mapView:(RCTMap *)mapView regionDidChangeAnimated:(BOOL)animated
|
- (void)mapView:(RCTMap *)mapView regionDidChangeAnimated:(BOOL)animated
|
||||||
|
|||||||
Reference in New Issue
Block a user