 
 open class NavigationController: UINavigationController {
     private let emptyBackBarButtonItem = UIBarButtonItem(title: "")
+
     /// A boolean value that determines whether the back button text is hidden.
     /// The default value is `true`.
     public var hideBackButtonText = true {

        preferredInterfaceOrientations = .portrait
        delegate = self

        // Overriding `animationControllerFor` method disables the native swipe back
        // gesture. Setting the delegate to `nil` restores the regular behavior.
        interactivePopGestureRecognizer?.delegate = nil
    }

    open override func awakeFromNib() {

        return nil
    }
}

// MARK: - Swipe Back Gesture

extension NavigationController: UIGestureRecognizerDelegate {
    open func gestureRecognizerShouldBegin(_ gestureRecognizer: UIGestureRecognizer) -> Bool {
        // Unfortunately, attempting to swipe on root view controller will freeze the
        // app and requires the app to be restarted to function normally. This check
        // ensures correct behavior is applied.
        viewControllers.count > 1
    }
}
