Hiding the tabbar and removing the space

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

    NOTE - This solution is to just to remove white space left after hiding tab bar.

    For hiding tab bar best solution is - @Michael Campsall answer here

    The simplest solution to this is to change your view's(in my case its tableView) bottom constraints, instead of giving bottom constraints with BottomLayoutGuide give it with superview. Screenshots attached for reference.

    Constraints shown in below screenshots creates the problem, change it according to next screenshot.

    Actual constraints to remove white space should be according to this(below) screenshot.

    0 讨论(0)
  • For me in iOS 13 I had to display image in cell with full screen, I had collection view with trailing, leading, top, bottom constraint. I removed all constraint. set collection view frame to UIScreen.main.bounds. then return sizeForItemAt as collection frame size.

    0 讨论(0)
提交回复
热议问题