diff --git a/Tusker/Screens/Fast Account Switcher/FastAccountSwitcherViewController.xib b/Tusker/Screens/Fast Account Switcher/FastAccountSwitcherViewController.xib index ad346055..80f8f521 100644 --- a/Tusker/Screens/Fast Account Switcher/FastAccountSwitcherViewController.xib +++ b/Tusker/Screens/Fast Account Switcher/FastAccountSwitcherViewController.xib @@ -1,9 +1,9 @@ - + - + @@ -32,7 +32,6 @@ - @@ -47,6 +46,7 @@ + diff --git a/Tusker/Screens/Main/MainTabBarViewController.swift b/Tusker/Screens/Main/MainTabBarViewController.swift index f7c1c6fc..b01b2f71 100644 --- a/Tusker/Screens/Main/MainTabBarViewController.swift +++ b/Tusker/Screens/Main/MainTabBarViewController.swift @@ -241,6 +241,7 @@ extension MainTabBarViewController { #if !os(visionOS) extension MainTabBarViewController: FastAccountSwitcherViewControllerDelegate { func fastAccountSwitcherAddToViewHierarchy(_ fastAccountSwitcher: FastAccountSwitcherViewController) { + fastAccountSwitcher.view.translatesAutoresizingMaskIntoConstraints = false view.addSubview(fastAccountSwitcher.view) NSLayoutConstraint.activate([ fastAccountSwitcher.accountsStack.bottomAnchor.constraint(equalTo: fastAccountSwitcher.view.bottomAnchor), @@ -249,6 +250,10 @@ extension MainTabBarViewController: FastAccountSwitcherViewControllerDelegate { fastAccountSwitcher.view.trailingAnchor.constraint(equalTo: view.trailingAnchor), fastAccountSwitcher.view.topAnchor.constraint(equalTo: view.topAnchor), fastAccountSwitcher.view.bottomAnchor.constraint(equalTo: tabBar.topAnchor), + + // The safe area insets don't automatically propagate for some reason, so do it ourselves. + fastAccountSwitcher.view.safeAreaLayoutGuide.leadingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.leadingAnchor), + fastAccountSwitcher.view.safeAreaLayoutGuide.trailingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.trailingAnchor), ]) }