     public init(tableView:UITableView) {
         self.tableView = tableView
         tableView.layoutIfNeeded()
-        self.rectHeight = self.tableView.frame.height
+        
         super.init()
         scrollCountView.translatesAutoresizingMaskIntoConstraints = false
         tableView.addSubview(scrollCountView)

        
        rightConstraint = NSLayoutConstraint(item: scrollCountView, attribute: .Trailing, relatedBy: .Equal, toItem: tableView, attribute: .Leading, multiplier: 1, constant: tableView.contentSize.width)
        tableView.addConstraint(rightConstraint)
        showCellScrollCount(false)
        
    }
    
    public func showCellScrollCount(animated:Bool) {

                size: CGSize(width: width, height: scrollCountViewHeight)
            )
        } else {
            let oneDistance = tableView.bounds.size.height / CGFloat(totalScrollCountNum)
            let currentCellHeight = currentCellRectu.size.height
            let currentCellOffset = currentCellRectu.origin.y
            var currentOffset = tableView.contentOffset.y + percentage*self.rectHeight
            let dxp = (currentOffset - currentCellOffset)/currentCellHeight
            
            let dx = dxp * oneDistance
            var ratio = CGFloat(scrollCountView.currentScrollCountNum) / CGFloat(totalScrollCountNum)
            var finalY = tableView.contentOffset.y + dx + ratio*scrollCountViewHeight + ratio*self.rectHeight
            
            if (finalY < 0) {
                finalY = 0
            } else if(finalY > (tableView.contentOffset.y + self.rectHeight - scrollCountViewHeight)) {
                var difY = finalY - (tableView.contentOffset.y + self.rectHeight - scrollCountViewHeight)
                print(difY)
                finalY -= difY
            }
            topConstraint.constant = finalY
        }
    }
}
