         interactivePopRecognizer?.delegate = self
     }
 
-    private func imageWithColor(_ color: UIColor, andSize size: CGSize) -> UIImage? {
-        let rect = CGRect(origin: CGPoint(x: 0, y: 0), size: size)
+    func resetNavigation() {
+        let navigationBar = navigationController?.navigationBar
 
-        UIGraphicsBeginImageContext(size)
-
-        if let context = UIGraphicsGetCurrentContext() {
-            context.setFillColor(color.cgColor)
-            context.fill(rect)
-
-            let image = UIGraphicsGetImageFromCurrentImageContext()
-            UIGraphicsEndImageContext()
-
-            return image
-        }
-
-        return nil
+        navigationBar?.subviews.first?.subviews.first?.removeFromSuperview()
+        navigationBar?.setBackgroundImage(nil, for: .default)
+        navigationBar?.shadowImage = nil
+        navigationBar?.titleTextAttributes = nil
     }
 }
 


    /// Update the navigation configuration based on the specified properties.
    func updateNavigation()
}

public extension CustomizableNavigation where Self: UIViewController, Self: UIGestureRecognizerDelegate {
    var barBackgroundColor: UIColor { return .white }
    var isBarTranslucent: Bool { return true }
    var isBarUsingBottomShadow: Bool { return true }
    var titleColor: UIColor { return .black }
    var titleFont: UIFont { return .systemFont(ofSize: 17) }

public protocol CustomizableNavigation {
    /// Specify this property to determine the navigation bar background color.
    var barBackgroundColor: UIColor { get }

    /// Specify this property to determine whether or not the navigation bar
    /// would use shadow. Set the value to false to remove a *strange*
