NavigationGestureKit is a lightweight Swift package that adds full‑width swipe‑back gestures to UINavigationController and WKWebView. A SwiftUI ViewModifier is included, so you can adopt it in both UIKit and SwiftUI projects with just a few lines of code.
NavigationBackSwipeHandlerenables a full-width back swipe forUINavigationControllerstacks.WebViewFullWidthBackSwipeHandlerallows full-width swipe gestures inWKWebView.
import SwiftUI
import NavigationGestureKit
struct ContentView: View {
var body: some View {
NavigationStack {
Text("Hello, world!")
.navigationTitle("Home")
.navigationBackSwipeHandler()
}
}
}import NavigationGestureKit
class RootViewController: UIViewController {
private let backSwipe = NavigationBackSwipeHandler()
override func viewDidLoad() {
super.viewDidLoad()
backSwipe.configure(for: self)
}
}Distributed under the MIT License. See LICENSE for details.
