From 822fa06046e2d84bb88a8235738ff83a3fa00d24 Mon Sep 17 00:00:00 2001 From: Justin Mazzocchi <2831158+jzzocc@users.noreply.github.com> Date: Mon, 21 Nov 2022 20:46:18 -0800 Subject: [PATCH] Formatting --- View Controllers/SwipeableNavigationController.swift | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/View Controllers/SwipeableNavigationController.swift b/View Controllers/SwipeableNavigationController.swift index 16e7ffb..195d088 100644 --- a/View Controllers/SwipeableNavigationController.swift +++ b/View Controllers/SwipeableNavigationController.swift @@ -5,21 +5,19 @@ import UIKit // ref: https://stackoverflow.com/a/60598558/3797903 class SwipeableNavigationController: UINavigationController { private lazy var fullWidthBackGestureRecognizer = UIPanGestureRecognizer() - + override func viewDidLoad() { super.viewDidLoad() setupFullWidthBackGesture() } - + private func setupFullWidthBackGesture() { - guard - let targets = interactivePopGestureRecognizer?.value(forKey: "targets") - else { return } - + guard let targets = interactivePopGestureRecognizer?.value(forKey: "targets") else { return } + // have fullWidthBackGestureRecognizer execute the same handler as interactivePopGestureRecognizer fullWidthBackGestureRecognizer.setValue(targets, forKey: "targets") fullWidthBackGestureRecognizer.delegate = self - + view.addGestureRecognizer(fullWidthBackGestureRecognizer) } }