             if !scrollView.isDecelerating{
                 if self.enumScrollPosition == .up {
                     UIView.animate(withDuration: 0.1, animations: {
-                        self.downCustomView()
+                        self.upCustomView()
                     })
                 }
             }

    }
    
    public func scrollViewDidEndDragging(_ scrollView: UIScrollView, willDecelerate decelerate: Bool) {
        // print("scrollview did end dragging")
        
        // top bar shouldn't be allowed to scroll in certain circumstances. please check this instance declaration for more information.

        
        if self.enumScrollPosition == .up {
            UIView.animate(withDuration: 0.1, animations: {
                self.upCustomView()
            })
        }
    }
    
    
    /*
     If your scroll didn't end properly, scrollViewDidEndDragging and scrollViewDidEndDecelerating delegates will handle it to scroll down perfectly.
     */
    func upCustomView() {
        
        constraintHeightOfNavigationView.constant = CGFloat(HEIGHT_OF_CUSTOMVIEW_AFTER_ANIMATION)
        countOfDidScrollDown = HEIGHT_OF_CUSTOMVIEW_AFTER_ANIMATION
        
