 #if os(iOS)
 import UIKit
 
-public protocol LayeredTableViewControllerDelegate {
+public protocol LayeredTableViewControllerDelegate: class {
     func bottomHeight(forLayeredTableViewController controller: LayeredTableViewController) -> CGFloat
     func contentInset(forLayeredTableViewController controller: LayeredTableViewController) -> UIEdgeInsets
 }

            self.bottomTableView.allowsSelection = isOpen
            self.openGestureRecognizer.isEnabled = !isOpen
        }
    }

    open override func viewDidLoad() {

        self.openGestureRecognizer = UITapGestureRecognizer(target: self, action: #selector(openBottom))
    }

    public weak var delegate: LayeredTableViewControllerDelegate? {
        didSet {
            self.view.setNeedsLayout()
        }
