0

Has anyone else noticed that changing the tab bar height programmatically is not working in iOS 13? Does anyone have a workaround? Same code works perfectly in iOS 11 and 12, but the tab bar is not resizing in iOS 13. Thanks

Brittany
  • 266
  • 1
  • 3
  • 8

1 Answers1

7

Without a snippet of your code it's hard to say what's wrong, but setting tab bar height's by subclassing UITabBarController and setting the tab bar height in viewDidLayoutSubviews works in both iOS 12 and 13.

class MainTabBarViewController: UITabBarController {

    override func viewDidLayoutSubviews() {
        super.viewDidLayoutSubviews()

        let tabBarHeight: CGFloat = 120
        var tabFrame = tabBar.frame
        tabFrame.size.height = tabBarHeight
        tabFrame.origin.y = view.frame.size.height - tabBarHeight
        tabBar.frame = tabFrame
    }

}
evanjd
  • 415
  • 7
  • 12