Syed e Hussaini Syed e Hussaini - 1 year ago 136
Swift Question

TabBar overhide view controllers content in navigation stack

I have a custom

class extend from

having three tabs each of them have different
. Problem is that when i push a
and the view controller loads successfully but TabBar hides the current pushed view controller's content from bottom. May be TabBar doesn't automatically autoresize the parent view of this view controller or may be there is any other issue.
Here is the screenshot of the view.
I have a tableview inside another view having four cells. Parent view of tableView have constraints top, leading,trailing and bottom equal to zero.
But the bottom layout of main view is below the tabBar. i guess that is why it hides my content.
I am using swift 2.2


Answer Source

UINavigationController and UITabBarController both have a common property of isTranslucent if this check is enabled then the parent view of current view controller is extended upward (below navigationBar) or downward(below tabbar) so to avoid the extension of views alignment or height simply disable the is translucent property to false.

In Objective C

self.navigationController.isTranslucent = NO
self.tabbarController.isTranslucent = NO

In Swift

self.navigationController.isTranslucent = false
self.tabbarController.isTranslucent = false 
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download