Formatting
This commit is contained in:
parent
3808a04d87
commit
822fa06046
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue