         func scrollViewDidEndDecelerating(_ scrollView: UIScrollView) {
             let needsHideAnimation = (position == .top && contentOffsetY < 0) || (position == .bottom && contentOffsetY >= contentHeight)
             if needsHideAnimation {
-                hideIfNeeded(true)
+                resetTimerIfNeeded()
             } else {
                 hide(false)
+            }
+        }
+        
+        func scrollViewDidEndDragging(_ scrollView: UIScrollView, willDecelerate decelerate: Bool) {
+            if autoHidden == true && decelerate == false && hiddenTimeInterval == 0 {
+                timer(_hiddenTimeInterval)
             }
         }
         

                
                if isHideIfNeeded {
                    contentOffsetY = position == .top ? -contentHeight : contentHeight
                    
                    hideIfNeeded(true)
                    return
                }

        }
        
        func setInterval(_ interval: TimeInterval) {
            _hiddenTimeInterval = interval
            
            if interval >= 0 {
                autoHidden = true
