         self.loadingView.isHidden = false
         self.loadingView.startAnimating()
         self.stateLab.text = Bundle.refreshString(key: .headerRefresh)
-        UIView.animate(withDuration: 0.25) { 
-            self.scrollView.contentInset = UIEdgeInsets(top: self.sizeH - self.origiOffsetY, left: 0, bottom: 0, right: 0)
+        UIView.animate(withDuration: 0.25) {
+            self.scrollView.contentInset = UIEdgeInsets(top: self.sizeH, left: 0, bottom: 0, right: 0)
         }
     }
     private func endAnimation() {
         self.status = .pull
-        UIView.animate(withDuration: 0.25, animations: { 
-            self.scrollView.contentInset = UIEdgeInsets( top: -self.origiOffsetY, left: 0, bottom: 0, right: 0)
+        UIView.animate(withDuration: 0.25, animations: {
+            self.scrollView.contentInset = UIEdgeInsets.zero
         }) { (flag) in
             self.imgView.isHidden = false
             self.loadingView.stopAnimating()

        super.layoutSubviews()
    }
    //MARK: - ***** private Method *****

    private func initUI() {
    
        self.addSubview(loadingView)
        loadingView.center = imgView.center
        loadingView.isHidden = true

import UIKit

class BQRefreshHeaderView: BQRefreshView {
    
    //MARK: - ***** Ivars *****
    private var imgView = UIImageView(image: Bundle.arrowImage())
    private let loadingView = UIActivityIndicatorView(style: .gray)
    private let stateLab: UILabel = BQRefreshView.refreshLab()
    
    //MARK: - ***** initialize Method *****
    init(_ block:@escaping ()->()) {
        self.init()
