diff --git a/ios/RCTBaiduMap/Views/OverlayMarker.m b/ios/RCTBaiduMap/Views/OverlayMarker.m index 1aab1ca4..4ffd531b 100644 --- a/ios/RCTBaiduMap/Views/OverlayMarker.m +++ b/ios/RCTBaiduMap/Views/OverlayMarker.m @@ -131,12 +131,6 @@ - (void)removeReactSubview:(UIView *)subview { [super removeReactSubview:subview]; } -- (void)didSetProps:(NSArray *)props { - NSLog(@"marker didSetProps:%@", props); - [super didSetProps:props]; - [self update]; -} - - (void)didUpdateReactSubviews { NSLog(@"didUpdateReactSubviews:%lu", (unsigned long)[self.reactSubviews count]); [super didUpdateReactSubviews]; diff --git a/ios/RCTBaiduMap/Views/OverlayView.h b/ios/RCTBaiduMap/Views/OverlayView.h index 136e3718..f72ecdae 100644 --- a/ios/RCTBaiduMap/Views/OverlayView.h +++ b/ios/RCTBaiduMap/Views/OverlayView.h @@ -13,6 +13,7 @@ #import #import #import +#import @interface OverlayView : UIView diff --git a/ios/RCTBaiduMap/Views/OverlayView.m b/ios/RCTBaiduMap/Views/OverlayView.m index 612f9a8a..f4267d3a 100644 --- a/ios/RCTBaiduMap/Views/OverlayView.m +++ b/ios/RCTBaiduMap/Views/OverlayView.m @@ -26,6 +26,12 @@ - (void)update { } +- (void)didSetProps:(NSArray *)props { + NSLog(@"overlay didSetProps:%@", props); + [super didSetProps:props]; + [self update]; +} + - (void)setStroke:(NSDictionary *)stroke { self.lineWidth = [RCTConvert double:stroke[@"width"]]; self.strokeColor = [RCTConvert NSString:stroke[@"color"]];