     }
     
     fileprivate func setNeedsNavigationBackground(alpha: CGFloat) {
-        
         let barBackgroundView = navigationBar.subviews[0]
-        
         let valueForKey = barBackgroundView.value(forKey:)
         
         if let shadowView = valueForKey("_shadowView") as? UIView {

import UIKit

extension UIColor {
    //System default bar tint color
    open class var defaultNavBarTintColor: UIColor {
        return UIColor(red: 0, green: 0.478431, blue: 1, alpha: 1.0)
    }

        }
        
        if context.isCancelled {
            let cancelDuration: TimeInterval = context.transitionDuration * Double(context.percentComplete)
            UIView.animate(withDuration: cancelDuration) {
                animations(.from)
            }
        } else {
            let finishDuration: TimeInterval = context.transitionDuration * Double(1 - context.percentComplete)
            UIView.animate(withDuration: finishDuration) {
                animations(.to)
            }
        }
    }
}
