I have a custom TabBarController
class extend from UITabBarController
having three tabs each of them have different UINavigationController
as RootViewController
. Problem is that when i push a ViewController
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
0
votes
1 Answers
0
votes
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