class CustomTabBarController: UITabBarController {
override func viewDidLoad() {
super.viewDidLoad()
guard #available(iOS 18, *), UIApplication.shared.isPad else {
return
}
// Setting the horizontal size class will force the tab bar
// to be displayed at the bottom.
traitOverrides.horizontalSizeClass = .compact
}
}