 
 open class RefreshBaseView: UIView {
     fileprivate weak var scrollViewDelegate: UIScrollViewDelegate?
+    fileprivate weak var refreshViewDelegate: UIScrollViewDelegate?
     
     var scrollView: UIScrollView? {
         return superview as? UIScrollView

extension RefreshBaseView: UIScrollViewDelegate {
    public func scrollViewDidScroll(_ scrollView: UIScrollView) {
        scrollViewDelegate?.scrollViewDidScroll?(scrollView)
    }
    
    public func scrollViewWillEndDragging(_ scrollView: UIScrollView, withVelocity velocity: CGPoint, targetContentOffset: UnsafeMutablePointer<CGPoint>) {
        scrollViewDelegate?.scrollViewWillEndDragging?(scrollView, withVelocity: velocity, targetContentOffset: targetContentOffset)
    }
    
    public func scrollViewDidZoom(_ scrollView: UIScrollView) {

    }
    
    override open func didMoveToSuperview() {
        if scrollView?.delegate is RefreshBaseView {
            refreshViewDelegate = scrollView?.delegate
        } else {
            scrollViewDelegate = scrollView?.delegate
        }
        scrollView?.delegate = self
        scrollView?.addObserver(self, forKeyPath: #keyPath(UIScrollView.delegate), options: .new, context: nil)
    }
