How to correct Tab Bar height issue on iPhone X

前端 未结 20 3480
长发绾君心
长发绾君心 2020-12-13 13:07

I\'m having an issue with my app when testing for iPhone X. I\'m not sure how to adjust this issue, as well as not make it an issue for non iPhone X sizes. This only seems t

20条回答
  •  一向
    一向 (楼主)
    2020-12-13 13:36

    Put this into your UITabBarViewController to correct the TabBar height if your UIViewController is rotatable.

    override func viewWillTransition(to size: CGSize, with coordinator: UIViewControllerTransitionCoordinator) {
            super.viewWillTransition(to: size, with: coordinator)
            tabBar.sizeToFit()
        }
    

提交回复
热议问题