 extension UINavigationBar
 {
     fileprivate struct AssociatedKeys {
-        static var backgroundView:UIView = UIView()
+        static var backgroundView: UIView = UIView()
+        static var backgroundImageView: UIImageView = UIImageView()
     }
     
     fileprivate var backgroundView:UIView? {

        static var pushToCurrentVCFinished: Bool = false
        static var pushToNextVCFinished:Bool = false
        
        static var navBarBarTintColor: UIColor = UIColor.defaultNavBarBarTintColor
        static var navBarBackgroundAlpha:CGFloat = 1.0
        static var navBarTintColor: UIColor = UIColor.defaultNavBarTintColor

        }
        set {
            objc_setAssociatedObject(self, &AssociatedKeys.pushToNextVCFinished, newValue, .OBJC_ASSOCIATION_ASSIGN)
        }
    }
    
    // you can set navigationBar backgroundImage
    var navBarBackgroundImage: UIImage? {
        get {
            guard let bgImage = objc_getAssociatedObject(self, &AssociatedKeys.navBarBackgroundImage) as? UIImage else {
                return nil
            }
            return bgImage
        }
        set {
            objc_setAssociatedObject(self, &AssociatedKeys.navBarBackgroundImage, newValue, .OBJC_ASSOCIATION_RETAIN_NONATOMIC)
        }
    }
    
