     }
   }
 
-  private var currentLayout: Layout = .portrait {
+  private var currentConstraints: LayoutConstraints! { // set in viewDidLoad
     didSet {
-      layoutConstraints[oldValue]!.disable()
-      currentConstraints.enable(showBar: isButtonBarVisible)
-      updateAdditionalSafeAreaInsets(isButtonBarVisible: isButtonBarVisible)
-    }
-  }
-
-  private var layoutConstraints: [Layout: LayoutConstraints] = [:]
-  private var currentConstraints: LayoutConstraints { return layoutConstraints[currentLayout]! }
+      currentConstraints.enable(showBar: false)
+    }
+  }
 
   override func viewDidLoad() {
     super.viewDidLoad()

      layout = LayoutConstraints(bar: bar, hidden: hidden, visible: visible, insets: insets)
    }
    return layout
  }

  private func prepareLandscapeLayout(buttonBar: MDCButtonBar, view: UIView) -> LayoutConstraints {
    var layout: LayoutConstraints!
    buttonBar.snp.prepareConstraints { (make) in
      var bar: [Constraint] = []
      bar.append(make.top.equalTo(view).offset(Metrics.landscapeBarTopInset).constraint)
      bar.append(make.bottom.equalTo(view).constraint)
      bar.append(make.width.equalTo(Metrics.buttonBarHeight).constraint)

      let hidden = make.leading.equalTo(view.snp.trailing).constraint
      let visible = make.trailing.equalTo(view).constraint

      let insets = UIEdgeInsets(top: 0, left: 0, bottom: 0, right: Metrics.buttonBarHeight)

      layout = LayoutConstraints(bar: bar, hidden: hidden, visible: visible, insets: insets)
    }
    return layout
  }

  private func updateCurrentLayout(for size: CGSize) {
    currentLayout = size.isWiderThanTall ? .landscape : .portrait
  }

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

    updateCurrentLayout(for: size)
  }

  private var isButtonBarVisible: Bool = false {

  private struct Metrics {
    static let defaultAnimationDuration: TimeInterval = 0.4
    static let buttonBarHeight: CGFloat = 88
  }

  let navController: UINavigationController = {
