         switch (keyPath, object) {
             
         case (.Some("contentOffset"), _):
-            self.updateScrollPosition()
-        default:
+            if y != tableView.contentOffset.y && totalScrollCountNum != 0 {
+                y = tableView.contentOffset.y
+                self.updateScrollPosition()
+            }
+            default:
             super.observeValueForKeyPath(keyPath, ofObject: object, change: change, context: context)
         }
     }
     
     func updateScrollPosition() {
-        
-        if currentCellRect != nil {
-            return
-        }
+
         //var currentCellRect:CGRect?
         let indexPaths = tableView.indexPathsForVisibleRows
+        var currentCellRect:CGRect?
         if let indexPaths = indexPaths {
             if indexPaths.count > 0 {
                 currentCellRect = tableView.rectForRowAtIndexPath(indexPaths[0])

                size: CGSize(width: scrollCountView.width, height: scrollCountViewHeight)
            )
        }
        
        currentCellRect = nil
    }
    
}
    public var scrollCountViewHeight:CGFloat = 20
    private var dragging:Bool = false
    private var dynamicUnpagedHeight:Bool = false
    var y:CGFloat = -1000

    public var opacity:CGFloat = 1 {
        didSet {
            scrollCountView.alpha = opacity
