 
     public fileprivate(set) var isOpen: Bool = true {
         didSet {
+            guard isOpen != oldValue else {
+                return
+            }
             self.bottomTableView.allowsSelection = isOpen
             self.openGestureRecognizer.isEnabled = !isOpen
         }

            self.bottomTableView.deselectRow(at: indexPath, animated: true)
        }

        self.arrange(for: self.view.bounds.size)
        self.bottomTableView.addObserver(self, forKeyPath: "contentSize", options: .initial, context: nil)
    }

    open override func viewWillTransition(to size: CGSize, with coordinator: UIViewControllerTransitionCoordinator) {


    public func openBottom() {
        self.bottomTableView.setContentOffset(CGPoint(x: 0, y: self.bottomOpenYOffset), animated: true)
        self.isOpen = true
    }
}

extension LayeredTableViewController: UIScrollViewDelegate {
    public func scrollViewWillEndDragging(_ scrollView: UIScrollView, withVelocity velocity: CGPoint, targetContentOffset: UnsafeMutablePointer<CGPoint>) {
        self.move(point: &targetContentOffset.pointee, toOutsideOfShowingTransitionRangeFor: scrollView)
    }
