         fatalError("init(coder:) has not been implemented")
     }
     
+    deinit {
+        self.stopObserveScrollView()
+    }
+    
     //MARK: - Setup
     func setup() {
         self.activityIndicatorView = UIActivityIndicatorView(activityIndicatorStyle: .gray)

    // ScrollView
    
    func resetInsets() {
        var contentInset = self.scrollView!.contentInset
        contentInset.bottom = self.originalInset.bottom
        self.setContentInset(contentInset)
    }
    
    func adjustInsets() {
        var contentInset = self.scrollView!.contentInset
        if self.isEnabled {
            contentInset.bottom = self.originalInset.bottom + self.height
        }
        self.setContentInset(contentInset)
    }
    
    func setContentInset(_ contentInset: UIEdgeInsets) {

    //MARK: - Layout
    override open func layoutSubviews() {
        super.layoutSubviews()
        if let size = self.scrollView?.bounds.size {
            self.frame = CGRect(x: 0, y: self.contentSize.height, width: size.width, height: self.height)
            self.activityIndicatorView.center = self.bounds.center
        }
        self.bringSubview(toFront: self.activityIndicatorView)
    }
    
