Skip to content

Commit

Permalink
fix(ios): assign touch handler to view
Browse files Browse the repository at this point in the history
  • Loading branch information
Gregoirevda committed Jan 25, 2024
1 parent 0111523 commit 31be603
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/react-native/React/Views/RCTModalHostView.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

@protocol RCTModalHostViewInteractor;

@interface RCTModalHostView : UIView <RCTInvalidating, UIAdaptivePresentationControllerDelegate>
@interface RCTModalHostView : UIView <RCTInvalidating, UIAdaptivePresentationControllerDelegate, UIGestureRecognizerDelegate>

@property (nonatomic, copy) NSString *animationType;
@property (nonatomic, assign) UIModalPresentationStyle presentationStyle;
Expand Down
1 change: 1 addition & 0 deletions packages/react-native/React/Views/RCTModalHostView.m
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ - (instancetype)initWithBridge:(RCTBridge *)bridge
containerView.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth;
_modalViewController.view = containerView;
_touchHandler = [[RCTTouchHandler alloc] initWithBridge:bridge];
_touchHandler.delegate = self;
_isPresented = NO;

__weak typeof(self) weakSelf = self;
Expand Down

0 comments on commit 31be603

Please sign in to comment.