diff --git a/packages/react-native-gesture-handler/apple/RNGestureHandlerButtonComponentView.mm b/packages/react-native-gesture-handler/apple/RNGestureHandlerButtonComponentView.mm index 196c41aa07..f144fb444d 100644 --- a/packages/react-native-gesture-handler/apple/RNGestureHandlerButtonComponentView.mm +++ b/packages/react-native-gesture-handler/apple/RNGestureHandlerButtonComponentView.mm @@ -72,9 +72,12 @@ - (void)mountChildComponentView:(RNGHUIView *)childCom [_buttonView mountChildComponentView:childComponentView index:index]; } -- (void)unmountChildComponentView:(RNGHUIView *)childComponentView index:(NSInteger)index +- (void)unmountChildComponentView:(RNGHUIView *)childComponentView + index:(NSInteger)__unused index { - [_buttonView unmountChildComponentView:childComponentView index:index]; + if (childComponentView.superview == _buttonView) { + [childComponentView removeFromSuperview]; + } } - (LayoutMetrics)buildWrapperMetrics:(const LayoutMetrics &)metrics