UITabbarController - padOS18: at top, padOS17 and before: at Bottom

This pertains to iPad apps and UITabbarController in UIKit.

Our internal app for employees utilizes UITabbarController displayed at the bottom of the screen. Users prefer to maintain consistency with it being at the bottom. It becomes challenging to argue against this when users point out the iPhone version displaying it "correctly" at the bottom. My response is to trust Apple's design team to keep it at the top.

One workaround is to develop the app using the previous Xcode version, version 15 (via Xcode Cloud), targeting padOS17. This ensures the tab bar is shown at the bottom of the screen. However, this approach has its drawbacks: Apple may not support it in the future, leading to missed secure updates for the app, among other issues.

Exploring the UITabbarController mode appears to be the solution I am seeking. To quote the documentation "on iPad, If the tabs array contains one or more UITabGroup items, the system displays the content as either a tab bar or a sidebar, depending on the context. Otherwise, it only displays the content only as a tab bar.". The part "displays the content only as a tab bar." made think this is BAU:

class ViewController: UITabBarController {

override func viewDidLoad() {
     super.viewDidLoad()
     self.mode = .tabBar
   }
}

Unfortunately, this does not resolve the issue.

Is there an API method that can force the tabbar to its previous bottom position?

The app uses multiple windows. When we split a window to launch another instance, the tab bar appears at the bottom. This behavior seems tied to the form factor—or potentially to how many items are in the tab bar.

We could build a custom tab bar to override this, but that goes against my “don’t reinvent the wheel” principle.

Any comments we welcome and thank you for reading this (to the end)

Theo

Is there an API method that can force the tabbar to its previous bottom position?

No there isn't. In iPadOS 18 the position of the tab bar moves from the bottom of the screen to float over your content at the top.

See Elevating your iPad app with a tab bar and sidebar to learn how to customize the content of UITabBarController

UITabbarController - padOS18: at top, padOS17 and before: at Bottom
 
 
Q