         }
     }
     
+    func scrollViewDidEndDragging(scrollView: UIScrollView, willDecelerate decelerate: Bool) {
+        if !decelerate {
+            currentOffsetX = scrollView.contentOffset.x
+        }
+    }
+    
+    func scrollViewDidEndDecelerating(scrollView: UIScrollView) {
+        currentOffsetX = scrollView.contentOffset.x
+    }
+    
 }

    
    // MARK: - Outlets
    
    private let scrollView = UIScrollView()
    private let tableView = UITableView()
    
    private let toolbar = UIView()

    }
    
    private func configureOutlets() {
        configureTableView()
        configureToolbar()
        configureToolbarButtons()
        configureOpacityGesture()
        configureCloseGesture()
    }
    
    private func configureTableView() {
        tableView.rowHeight = Default.RowHeight
        tableView.allowsSelection = false
        tableView.separatorStyle = .None

