Open
Description
Describe the bug:
I want to listen swipe gestures for logging purposes on the screen where I'm using the SwipeListView, so I added an UISwipeGestureRecognizer to the SwipeListView's container view. After that I saw that SwipeListView's actions are stuck.
To Reproduce:
You can reproduce the issue by adding any gesture recognizer to the window or the rootView in the appDelegate class of the example project, detailed below.
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];
RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge
moduleName:@"SwipeListExample"
initialProperties:nil];
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
UIViewController *rootViewController = [UIViewController new];
rootViewController.view = rootView;
self.window.rootViewController = rootViewController;
[self.window makeKeyAndVisible];
UISwipeGestureRecognizer *leftSwipeGesture = [[UISwipeGestureRecognizer alloc]
initWithTarget:self
action:@selector(handleSwipe:)];
leftSwipeGesture.direction = UISwipeGestureRecognizerDirectionLeft;
leftSwipeGesture.cancelsTouchesInView = NO;
[self.window addGestureRecognizer:leftSwipeGesture];
UISwipeGestureRecognizer *rightSwipeGesture = [[UISwipeGestureRecognizer alloc]
initWithTarget:self
action:@selector(handleSwipe:)];
rightSwipeGesture.direction = UISwipeGestureRecognizerDirectionRight;
rightSwipeGesture.cancelsTouchesInView = NO;
[self.window addGestureRecognizer:rightSwipeGesture];
return YES;
}
- (void) handleSwipe: (UISwipeGestureRecognizer *)recognizer
{
//Code to handle the gesture
}
Environment:
- OS: iOS 15
- RNSLV Version: 3.2.9
- RN Version: 0.64.2
Metadata
Metadata
Assignees
Labels
No labels