diff --git a/Tusker/Screens/Main/MainTabBarViewController.swift b/Tusker/Screens/Main/MainTabBarViewController.swift index a2a0adf1..dc3b81b3 100644 --- a/Tusker/Screens/Main/MainTabBarViewController.swift +++ b/Tusker/Screens/Main/MainTabBarViewController.swift @@ -141,8 +141,8 @@ class MainTabBarViewController: UITabBarController, UITabBarControllerDelegate { return } NSLayoutConstraint.deactivate(fastSwitcherConstraints) - // using interfaceOrientation isn't ideal, but UITabBar buttons may lay out horizontally even in the compact size class - if traitCollection.horizontalSizeClass == .compact && interfaceOrientation.isPortrait { + let isPortrait = view.bounds.width < view.bounds.height + if traitCollection.horizontalSizeClass == .compact && isPortrait { fastSwitcherConstraints = [ fastSwitcherIndicator.centerYAnchor.constraint(equalTo: myProfileButton.centerYAnchor, constant: -4), // tab bar button image width is 30