mirror of
https://github.com/metabolist/metatext.git
synced 2024-12-18 03:36:30 +00:00
Formatting
This commit is contained in:
parent
3808a04d87
commit
822fa06046
1 changed files with 5 additions and 7 deletions
|
@ -5,21 +5,19 @@ import UIKit
|
||||||
// ref: https://stackoverflow.com/a/60598558/3797903
|
// ref: https://stackoverflow.com/a/60598558/3797903
|
||||||
class SwipeableNavigationController: UINavigationController {
|
class SwipeableNavigationController: UINavigationController {
|
||||||
private lazy var fullWidthBackGestureRecognizer = UIPanGestureRecognizer()
|
private lazy var fullWidthBackGestureRecognizer = UIPanGestureRecognizer()
|
||||||
|
|
||||||
override func viewDidLoad() {
|
override func viewDidLoad() {
|
||||||
super.viewDidLoad()
|
super.viewDidLoad()
|
||||||
setupFullWidthBackGesture()
|
setupFullWidthBackGesture()
|
||||||
}
|
}
|
||||||
|
|
||||||
private func setupFullWidthBackGesture() {
|
private func setupFullWidthBackGesture() {
|
||||||
guard
|
guard let targets = interactivePopGestureRecognizer?.value(forKey: "targets") else { return }
|
||||||
let targets = interactivePopGestureRecognizer?.value(forKey: "targets")
|
|
||||||
else { return }
|
|
||||||
|
|
||||||
// have fullWidthBackGestureRecognizer execute the same handler as interactivePopGestureRecognizer
|
// have fullWidthBackGestureRecognizer execute the same handler as interactivePopGestureRecognizer
|
||||||
fullWidthBackGestureRecognizer.setValue(targets, forKey: "targets")
|
fullWidthBackGestureRecognizer.setValue(targets, forKey: "targets")
|
||||||
fullWidthBackGestureRecognizer.delegate = self
|
fullWidthBackGestureRecognizer.delegate = self
|
||||||
|
|
||||||
view.addGestureRecognizer(fullWidthBackGestureRecognizer)
|
view.addGestureRecognizer(fullWidthBackGestureRecognizer)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue