Don't use deprecated interfaceOrientation for detecting portrait mode
This commit is contained in:
parent
203c1852d4
commit
2eda9657ac
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue