Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,6 @@
/// gesture. 0 by default, which means it will ignore this limit.
@property (nonatomic, assign) CGFloat fd_interactivePopMaxAllowedInitialDistanceToLeftEdge;

@property (assign, nonatomic) BOOL fd_shouldSimultaneouslyRecognizeFullScreenPopGesture;

@end
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,14 @@ - (BOOL)gestureRecognizerShouldBegin:(UIPanGestureRecognizer *)gestureRecognizer
return YES;
}

- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer {
UIViewController *controller = self.navigationController.viewControllers.lastObject;
if (controller && controller.fd_shouldSimultaneouslyRecognizeFullScreenPopGesture) {
return controller.fd_shouldSimultaneouslyRecognizeFullScreenPopGesture;
}
return NO;
}

@end

typedef void (^_FDViewControllerWillAppearInjectBlock)(UIViewController *viewController, BOOL animated);
Expand Down Expand Up @@ -285,4 +293,12 @@ - (void)setFd_interactivePopMaxAllowedInitialDistanceToLeftEdge:(CGFloat)distanc
objc_setAssociatedObject(self, key, @(MAX(0, distance)), OBJC_ASSOCIATION_RETAIN_NONATOMIC);
}

- (void)setFd_shouldSimultaneouslyRecognizeFullScreenPopGesture:(BOOL)fd_shouldSimultaneouslyRecognizeFullScreenPopGesture {
objc_setAssociatedObject(self, @selector(fd_shouldSimultaneouslyRecognizeFullScreenPopGesture), @(fd_shouldSimultaneouslyRecognizeFullScreenPopGesture), OBJC_ASSOCIATION_ASSIGN);
}

- (BOOL)fd_shouldSimultaneouslyRecognizeFullScreenPopGesture {
return [objc_getAssociatedObject(self, _cmd) boolValue];
}

@end