Is there a way to hide tabbar and remove that space left (around 50px) ?
I tried
self.tabBarController?.tabBar.hidden = true
self.extendedLayoutIncludesOpaqueBars = true
No luck. I see blank space.
Is there a way to hide tabbar and remove that space left (around 50px) ?
I tried
self.tabBarController?.tabBar.hidden = true
self.extendedLayoutIncludesOpaqueBars = true
No luck. I see blank space.
Sometimes that easiest way is just to add a view that uses the UIScreen bounds.
Cause sometimes the view edges extends beyond the nav bar giving you new problems if you extend the view layout.
This code works on iOS 10, 11, and iPhone X (including simulators) to show/hide the tabBar. I created it several years (iOS 7 time frame?) and it has worked reliably since that time.
It works great on iPhone X as long as content content in your childViewControllers (in tabs) is pinned to
topLayoutGuide
,bottomLayoutGuide
or SafeArea and not the main views walls. Then it all just works. Enjoy!Usage - I call it in the viewController on rotation events like so: