     
     //MARK:-----Getter and Setter-----
     var lastPosition: CGFloat = 0
-    var headerHeightConstraint: Constraint? = nil
+    var headerTopConstraint: Constraint? = nil
     var model: HomePopularModel? {
         didSet {
             self.toolBar.backgroundColor = UIColor.orangeColor()

    //MARK:-----UIScrollViewDelegate-----
    func scrollViewDidScroll(scrollView: UIScrollView) {
        let currentPosition: CGFloat = scrollView.contentOffset.y
        if currentPosition - self.lastPosition > 10 {
            
            UIView.animateWithDuration(1, animations: {
                self.headerHeightConstraint?.updateOffset(0)
            })
            self.lastPosition = currentPosition
            
        } else if self.lastPosition - currentPosition > 10 {
            
            UIView.animateWithDuration(1, animations: {
                self.headerHeightConstraint?.updateOffset(50)
            })
            self.lastPosition = currentPosition
        }

        }
        
        self.headerBack.snp_makeConstraints { (make) in
            make.left.right.equalTo(self.view)
            self.headerTopConstraint = make.top.equalTo(self.view).constraint
            make.height.equalTo(50)
        }
    }
    
