 
     func updateNavigation() {
         let navigationBar = navigationController?.navigationBar
-        let navigationBarColor = imageWithColor(barBackgroundColor, andSize: CGSize(width: 1, height: 1))
 
-        navigationBar?.setBackgroundImage(navigationBarColor, for: .default)
+        navigationBar?.setBackgroundImage(UIImage(), for: .default)
         navigationBar?.shadowImage = isBarUsingBottomShadow ? nil : UIImage()
-        navigationBar?.isTranslucent = isBarTranslucent
+
+        var barView = navigationBar?.subviews.first?.subviews.first
+
+        if barView == nil || barView != nil && type(of: barView!) != UIView.self {
+            barView = UIView(frame: CGRect.zero)
+
+            if let navBarSize = navigationBar?.frame.size {
+                let statusBarSize = UIApplication.shared.statusBarFrame.size
+                barView?.frame.size = CGSize(width: navBarSize.width, height: navBarSize.height + statusBarSize.height)
+            }
+
+            navigationBar?.subviews.first?.insertSubview(barView!, at: 0)
+        }
+
+        barView?.backgroundColor = barBackgroundColor
 
         var titleTextAttributes = navigationBar?.titleTextAttributes ?? [:]
 


    /// 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*
