   }
 }
 
+extension MDCDragonsController {
+  func setUpKeyboardWatcher() {
+    NotificationCenter.default.addObserver(self, selector: #selector(keyboardWillShow(notification:)), name: .MDCKeyboardWatcherKeyboardWillShow, object: nil)
+    NotificationCenter.default.addObserver(self, selector: #selector(keyboardWillHide(notification:)), name: .MDCKeyboardWatcherKeyboardWillHide, object: nil)
+    NotificationCenter.default.addObserver(self, selector: #selector(keyboardWillChangeFrame(notification:)), name: .MDCKeyboardWatcherKeyboardWillChangeFrame, object: nil)
+  }
+
+  func keyboardWillShow(notification: NSNotification) {
+    guard let userInfo = notification.userInfo else { return }
+    updateScrollViewWithKeyboardNotificationUserInfo(userInfo: userInfo)
+  }
+
+  func keyboardWillHide(notification: NSNotification) {
+    guard let userInfo = notification.userInfo else { return }
+    updateScrollViewWithKeyboardNotificationUserInfo(userInfo: userInfo)
+  }
+
+  func keyboardWillChangeFrame(notification: NSNotification) {
+    guard let userInfo = notification.userInfo else { return }
+    updateScrollViewWithKeyboardNotificationUserInfo(userInfo: userInfo)
+  }
+
+  func updateScrollViewWithKeyboardNotificationUserInfo(userInfo: [AnyHashable: Any]) {
+    guard let endFrame = userInfo[AnyHashable("UIKeyboardFrameEndUserInfoKey")] as? CGRect
+      else { return }
+    let endKeyboardFrameOriginInWindow = view.convert(endFrame.origin, from: nil)
+    let tableViewMaxY = tableView.frame.maxY
+    let baseInset = tableViewMaxY - endKeyboardFrameOriginInWindow.y
+    let scrollIndicatorInset = baseInset
+    var contentInset = baseInset
+    if #available(iOS 11, *) {
+      if endKeyboardFrameOriginInWindow.y < tableViewMaxY {
+        contentInset -= view.safeAreaInsets.bottom
+      }
+    }
+    tableView.contentInset.bottom = contentInset
+    tableView.scrollIndicatorInsets.bottom = scrollIndicatorInset
+  }
+}

    let offset = scrollView.contentOffset.y
    let inset = scrollView.contentInset.top
    let relativeOffset = inset + offset
    
    headerView.imageView.alpha = 1 - (relativeOffset / Constants.headerScrollThreshold)
    headerView.title.alpha = 1 - (relativeOffset / Constants.headerScrollThreshold)
  }
  
  override func viewWillAppear(_ animated: Bool) {
    super.viewWillAppear(animated)
    navigationController?.setNavigationBarHidden(true, animated: animated)
  }
  
  override var childViewControllerForStatusBarStyle: UIViewController? {
    return headerViewController
  }
  
  override var childViewControllerForStatusBarHidden: UIViewController? {
    return headerViewController
  }
  
  // MARK: UITableViewDataSource
  func numberOfSections(in tableView: UITableView) -> Int {
    return isSearchActive ? 1 : 2

                            UITableViewDataSource,
                            UISearchBarDelegate,
                            UIGestureRecognizerDelegate {

  fileprivate struct Constants {
    static let headerScrollThreshold: CGFloat = 50
    static let headerViewMaxHeight: CGFloat = 113
