Reputation: 23
I am troubling in hide UITabBarController
inside the TabBar item ChildViewControllers
For Ex. Suppose We have two tab bar item in my home screen and first tab bar item is selected and i want to go with navigate first tab bar then i want to hide TabBar in first TabBar item childViewControllers
Upvotes: 2
Views: 291
Reputation: 1377
before view is pushed or showed. hidesBottomBarWhenPushed variable on viewcontroll will be checked and automaticlly hides bottom bar. you can use it in two ways:
1- override it in child controllers:
override var hidesBottomBarWhenPushed: Bool {
return true
}
2- you can set it before performing segue in prepare for segue:
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
if segue.identifier == "identifier" {
segue.destination.hidesBottomBarWhenPushed = true
}
}
Upvotes: 1
Reputation: 120
I found solution for this
[self.tabBarController.tabBar setHidden:YES];
use hide Tab bar item in viewDidLoad using hidden property. And Select Under Opaque Bars option in storyBoard ViewController.
Upvotes: 1