diff --git a/Simplenote/SPNavigationController.swift b/Simplenote/SPNavigationController.swift index 9cfaa69d8..07dedd73d 100644 --- a/Simplenote/SPNavigationController.swift +++ b/Simplenote/SPNavigationController.swift @@ -85,8 +85,12 @@ class SPNavigationController: NSViewController { let currentView = topViewController?.view attach(child: viewController) - if let currentView { - currentView.removeConstraints(currentView.constraints) + + /// Disable Bottom Constraint + /// This allows for the enclosing NSWindow to resize, just enough to fit the `nextViewController.view` + /// + if let currentView, let bottomConstraint = view.firstContraint(firstView: currentView, firstAttribute: .bottom) { + bottomConstraint.isActive = false } guard let (leadingAnchor, trailingAnchor) = attachView(subview: viewController.view, below: currentView) else { @@ -139,6 +143,13 @@ class SPNavigationController: NSViewController { guard viewStack.count > 1, let currentViewController = viewStack.popLast(), let nextViewController = viewStack.last else { return } + + /// Disable Bottom Constraint + /// This allows for the enclosing NSWindow to resize, just enough to fit the `nextViewController.view` + /// + if let currentBottomConstraint = view.firstContraint(firstView: currentViewController.view, firstAttribute: .bottom) { + currentBottomConstraint.isActive = false + } attachView(subview: nextViewController.view, below: currentViewController.view)