         fileprivate var contentView: UIView?
         fileprivate var autoHidden: Bool = false
         fileprivate var hiddenTimeInterval: TimeInterval = 0
+        /// interval until hiding set by `setInterval(_:)`
+        private var _hiddenTimeInterval: TimeInterval = 0 {
+            didSet {
+                hiddenTimeInterval = _hiddenTimeInterval
+            }
+        }
         fileprivate var contentHeight: CGFloat {
             return noticeView.bounds.height
         }

        func scrollViewDidEndDecelerating(_ scrollView: UIScrollView) {
            let needsHideAnimation = (position == .top && contentOffsetY < 0) || (position == .bottom && contentOffsetY >= contentHeight)
            if needsHideAnimation {
                hideIfNeeded(true)
            } else {
                hide(false)
            }
        }
        

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