         currentChildVc.tableView.contentOffset.y = currentOffsetY - defaultOffSetY
         
         
-//                let offset: CGFloat = scrollView.contentOffset.y
-        
-                var alpha: CGFloat = currentOffsetY * 1 / 98.0
-        
-        
-                if alpha <= 0 {
+
+            navigationBarAlpha = currentOffsetY * 1 / 98.0
+        
+        
+                if navigationBarAlpha <= 0 {
         
                 }
         
-                if alpha >= 1 {
-                    alpha = 0.99
+                if navigationBarAlpha >= 1 {
+
                     navigationItem.rightBarButtonItem = UIBarButtonItem(image: UIImage(named: "home_sign_top_icon_19x19_"), highlightImage: nil, target: self, action: #selector(signClick))
                 } else {
                     navigationItem.rightBarButtonItem = UIBarButtonItem(image: UIImage(named: "home_sign_icon_33x33_"), highlightImage: UIImage(named: "home_sign_highlight_icon_33x33_"), target: self, action: #selector(signClick))
                 }
         
-                navigationController?.navigationBar.setBackgroundImage(UIImage(color: UIColor(white: 1.0, alpha: alpha)), forBarMetrics: .Default)
+        navigationController?.navigationBar.zz_setBackgroundColor(UIColor.whiteColor().colorWithAlphaComponent(navigationBarAlpha))
+        navigationController?.navigationBar.zz_setElementAlpha(navigationBarAlpha)
+        
         
         
         

        addNotificationObserver()
        loadBannerData()
        
    }
    
    //加载轮播图

extension BTHomeViewController: UIScrollViewDelegate {
    func scrollViewDidScroll(scrollView: UIScrollView) {
        currentOffsetY = scrollView.contentOffset.y
        
        headView.frame.origin.y = currentOffsetY
        if currentOffsetY < 0 {
            containerView.frame.origin.y = -currentOffsetY
