     }
     
     public func removeTopPullToRefresh() -> Void {
+        endTopPullToRefresh()
         topRefreshContainerView?.removeFromSuperview()
         topRefreshContainerView = nil
     }

    }
    
    public func removeBottomPullToRefresh() -> Void {
        bottomRefreshContainerView?.removeFromSuperview()
        bottomRefreshContainerView = nil
    }


public extension UIScrollView {
    public func addTopRefreshContainerViewWithHeight(height: CGFloat, actionCallback: RefreshActionCallback?) -> Void {
        let topRefreshContainerView: TopRefreshContainerView = TopRefreshContainerView(height: height, scrollView: self)
        addSubview(topRefreshContainerView)
        self.topRefreshContainerView = topRefreshContainerView
