Hiding the tabbar and removing the space

前端 未结 14 1704
生来不讨喜
生来不讨喜 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:04

    You can refer this link - iOS/Swift - Hide/Show UITabBarController when scrolling down/up. For better Result Do not forget to add this line of code in your viewdidLoad() for Black screen removal after hiding Tab bar.

    if #available(iOS 11.0, *) {
            self.myScroll.contentInsetAdjustmentBehavior = .never
        }
    

提交回复
热议问题