         case all
     }
 }
+

        let options: UIViewAnimationOptions = [.allowUserInteraction, .beginFromCurrentState]
        UIView.animate(withDuration: 0.3, delay: 0, options: options, animations: { [weak self] in
            self?.scrollView?.contentInset = contentInset
        }, completion: nil)
    }
    
    //MARK: - Observing

    // TableView returns wrong content size when takes table header and footer views.
    var contentSize: CGSize {
        if let tableView = self.scrollView as? UITableView {
            let rowsCount = tableView.dataSource?.tableView(tableView, numberOfRowsInSection: 0) ?? 0
            if let footerView = tableView.tableFooterView , rowsCount == 0 {
                return CGSize(width: tableView.contentSize.width, height: footerView.frame.origin.y)
            }
            if let footerView = tableView.tableFooterView, let headerView = tableView.tableHeaderView, rowsCount == 0 {
                return CGSize(width: tableView.contentSize.width, height: footerView.bounds.height + headerView.bounds.height)
            }
            
        }
        return self.scrollView?.contentSize ?? UIScreen.main.bounds.size
    }
