diff --git a/Tusker/Screens/Utilities/SplitNavigationController.swift b/Tusker/Screens/Utilities/SplitNavigationController.swift index 2e0cf2bb6e..63e8433c60 100644 --- a/Tusker/Screens/Utilities/SplitNavigationController.swift +++ b/Tusker/Screens/Utilities/SplitNavigationController.swift @@ -87,7 +87,7 @@ class SplitNavigationController: UIViewController { NSLayoutConstraint.activate([ rootNav.view.topAnchor.constraint(equalTo: view.topAnchor), rootNav.view.bottomAnchor.constraint(equalTo: view.bottomAnchor), - rootNav.view.leadingAnchor.constraint(equalTo: view.leadingAnchor), + rootNav.view.leadingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.leadingAnchor), separatorView.topAnchor.constraint(equalTo: view.topAnchor), separatorView.bottomAnchor.constraint(equalTo: view.bottomAnchor), @@ -196,13 +196,13 @@ class SplitNavigationController: UIViewController { NSLayoutConstraint.deactivate(constraints) if visible { constraints = [ - rootNav.view.trailingAnchor.constraint(equalTo: view.centerXAnchor), - secondaryNav.view.trailingAnchor.constraint(equalTo: view.trailingAnchor), + rootNav.view.trailingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.centerXAnchor), + secondaryNav.view.trailingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.trailingAnchor), ] } else { constraints = [ - rootNav.view.trailingAnchor.constraint(equalTo: view.trailingAnchor), - secondaryNav.view.widthAnchor.constraint(equalTo: view.widthAnchor, multiplier: 0.5), + rootNav.view.trailingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.trailingAnchor), + secondaryNav.view.widthAnchor.constraint(equalTo: rootNav.view.widthAnchor), ] } NSLayoutConstraint.activate(constraints)