Skip to content

Commit 59ca2d5

Browse files
committed
Use gestureRecognizerShouldBegin instead of shouldBeRequiredToFailBy for a back swipe check
1 parent 42063c4 commit 59ca2d5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

WooCommerce/Classes/Extensions/UINavigationController+Woo.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,12 +95,12 @@ extension UIViewController: NavigationSwipeBackHandler {
9595
/// This is necessary due to Swift 6 [SE-0364 proposal](https://github.com/swiftlang/swift-evolution/blob/main/proposals/0364-retroactive-conformance-warning.md).
9696
extension UIViewController: @retroactive UIGestureRecognizerDelegate {
9797

98-
public func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldBeRequiredToFailBy otherGestureRecognizer: UIGestureRecognizer) -> Bool {
98+
public func gestureRecognizerShouldBegin(_ gestureRecognizer: UIGestureRecognizer) -> Bool {
9999
if gestureRecognizer.isEqual(navigationController?.interactivePopGestureRecognizer) && navigationController?.topViewController == self {
100100
return shouldPopOnSwipeBack()
101101
}
102102

103-
return false
103+
return true
104104
}
105105

106106
func handleSwipeBackGesture() {

0 commit comments

Comments
 (0)