         return topViewController?.preferredStatusBarStyle ?? .default
     }
     
+    static let _onceToken = UUID().uuidString
+    
     open override class func initialize(){
         
         if self == UINavigationController.self {
             
-            let needSwizzleSelectorArr = [["ori":NSSelectorFromString("_updateInteractiveTransition:"),"swi":NSSelectorFromString("et_updateInteractiveTransition:")],
-                ["ori":#selector(popToViewController(_:animated:)),"swi":#selector(et_popToViewController(_:animated:))],
-                ["ori":#selector(popToRootViewController(animated:)),"swi":#selector(et_popToRootViewController(animated:))]]
-            
-            for needSwizzleSelector in needSwizzleSelectorArr {
-                let originalSelector = needSwizzleSelector["ori"]
-                let swizzledSelector = needSwizzleSelector["swi"]
-                let originalMethod = class_getInstanceMethod(self.classForCoder(), originalSelector)
-                let swizzledMethod = class_getInstanceMethod(self.classForCoder(), swizzledSelector)
-                method_exchangeImplementations(originalMethod, swizzledMethod)
-            }
-            
-        }
-        
-    }
-    
-
+            DispatchQueue.once(token: _onceToken) {
+                let needSwizzleSelectorArr = [
+                    NSSelectorFromString("_updateInteractiveTransition:"),
+                    #selector(popToViewController),
+                    #selector(popToRootViewController)
+                ]
+                
+                for selector in needSwizzleSelectorArr {
+                    
+                    let str = ("et_" + selector.description).replacingOccurrences(of: "__", with: "_")
+                    let originalMethod = class_getInstanceMethod(self, selector)
+                    let swizzledMethod = class_getInstanceMethod(self, Selector(str))
+                    method_exchangeImplementations(originalMethod, swizzledMethod)
+                }
+            }
+        }
+    }
+    
+    
     func et_updateInteractiveTransition(_ percentComplete: CGFloat) {
         et_updateInteractiveTransition(percentComplete)
-        if let topVC = self.topViewController {
-            if let coor = topVC.transitionCoordinator {
-                //Bg Alpha
-                let fromAlpha = coor.viewController(forKey: .from)?.navBarBgAlpha
-                let toAlpha = coor.viewController(forKey: .to)?.navBarBgAlpha
-                let nowAlpha = fromAlpha! + (toAlpha!-fromAlpha!)*percentComplete
-                
-                self.setNeedsNavigationBackground(alpha: nowAlpha)
-                
-                //tintColor
-                let fromColor = coor.viewController(forKey: .from)?.navBarTintColor
-                let toColor = coor.viewController(forKey: .to)?.navBarTintColor
-                let nowColor = averageColor(fromColor: fromColor!, toColor: toColor!, percent: percentComplete)
-                self.navigationBar.tintColor = nowColor
-            }
-        }
+        guard let topVC = topViewController, let coor = topVC.transitionCoordinator else { return }
+        
+        //Bg Alpha
+        let fromAlpha = coor.viewController(forKey: .from)?.navBarBgAlpha ?? 0
+        let toAlpha = coor.viewController(forKey: .to)?.navBarBgAlpha ?? 0
+        let nowAlpha = fromAlpha + (toAlpha - fromAlpha) * percentComplete
+        
+        setNeedsNavigationBackground(alpha: nowAlpha)
+        
+        //tintColor
+        let fromColor = coor.viewController(forKey: .from)?.navBarTintColor ?? .blue
+        let toColor = coor.viewController(forKey: .to)?.navBarTintColor ?? .blue
+        let nowColor = averageColor(fromColor: fromColor, toColor: toColor, percent: percentComplete)
+        navigationBar.tintColor = nowColor
     }
     
     //Calculate the middle Color with translation percent
     private func averageColor(fromColor:UIColor, toColor:UIColor, percent:CGFloat) -> UIColor {
-        var fromRed :CGFloat = 0.0
-        var fromGreen :CGFloat = 0.0
-        var fromBlue :CGFloat = 0.0
-        var fromAlpha :CGFloat = 0.0
+        var fromRed: CGFloat = 0.0
+        var fromGreen: CGFloat = 0.0
+        var fromBlue: CGFloat = 0.0
+        var fromAlpha: CGFloat = 0.0
         fromColor.getRed(&fromRed, green: &fromGreen, blue: &fromBlue, alpha: &fromAlpha)
         
         var toRed :CGFloat = 0.0

    
    open var navBarTintColor: UIColor {
        get {
            let tintColor = objc_getAssociatedObject(self, &AssociatedKeys.navBarTintColor) as? UIColor
            if tintColor == nil {
                return UIColor.defaultNavBarTintColor()
            }else{
                return tintColor!
            }
            
        }
        set {

        var toAlpha :CGFloat = 0.0
        toColor.getRed(&toRed, green: &toGreen, blue: &toBlue, alpha: &toAlpha)
        
        let nowRed = fromRed + (toRed - fromRed) * percent
        let nowGreen = fromGreen + (toGreen - fromGreen) * percent
        let nowBlue = fromBlue + (toBlue - fromBlue) * percent
        let nowAlpha = fromAlpha + (toAlpha - fromAlpha) * percent
        
        return UIColor(red: nowRed, green: nowGreen, blue: nowBlue, alpha: nowAlpha)
    }
    
    func et_popToViewController(_ viewController: UIViewController, animated: Bool) -> [UIViewController]? {
        setNeedsNavigationBackground(alpha: viewController.navBarBgAlpha)
        navigationBar.tintColor = viewController.navBarTintColor
        return et_popToViewController(viewController, animated: animated)
    }
    
    func et_popToRootViewController(animated: Bool) -> [UIViewController]? {
        setNeedsNavigationBackground(alpha: viewControllers.first?.navBarBgAlpha ?? 0)
        navigationBar.tintColor = viewControllers.first?.navBarTintColor
        return et_popToRootViewController(animated: animated)
    }
    
    fileprivate func setNeedsNavigationBackground(alpha:CGFloat) {
        
        let barBackgroundView = navigationBar.subviews[0]
        if let shadowView = barBackgroundView.value(forKey: "_shadowView") as? UIView {
