Hiding the tabbar and removing the space

前端 未结 14 1693
生来不讨喜
生来不讨喜 2020-11-30 00:10

Is there a way to hide tabbar and remove that space left (around 50px) ?

I tried

self.tabBarController?.tabBar.hidden = true
self.extendedLayoutIncl         


        
14条回答
  •  爱一瞬间的悲伤
    2020-11-30 01:16

    Programmatically, add this to the next view controller for swift 4.

    override func viewWillAppear(_ animated: Bool) {
        super.viewWillAppear(animated)
        tabBarController?.tabBar.isHidden = true
        edgesForExtendedLayout = UIRectEdge.bottom
        extendedLayoutIncludesOpaqueBars = true
    }
    

    And add a background color

提交回复
热议问题