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

    }
    
    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 !scrollView.isDecelerating{
                if self.enumScrollPosition == .up {
                    UIView.animate(withDuration: 0.1, animations: {
                        self.upCustomView()
                    })
                }
            }
