0
votes

I am creating an iOS application where I need to add a SideMenu and a UITabBarController, SideMenu and UITabBarController there purpose is to let the users navigates between different ViewControllers, I have 3 tab bar items in UITabBarController and in the SideMenu I have 5 items, when the user click on an item in the side menu I have to show the corresponding view controller

Question: It's possible to add a ViewController without a TabBarItem to the UITabBarController, when the user click on the side menu item, I trigger the UITabBarController to select the corresponding view controller, or its not possible in UITabBarController I need to find another solution, if so please advice which solution is better.

enter image description here

In the picture above, These are my viewcontrollers but I need to hide the tab bar item for the last view controller and keep the UITabBarViewController behave normally when I programmatically select the last view controller from the side menu

1
Do you mind rephrasing the question? I'm not sure I understand what you are trying to achieve. Would it help if you just don't use TabBar, and instead present a view controller? (I'm not sure when you want the tabbar visible and when it should not show the tab bar item)Nitin Alabur
1) you can always hide the tabBar on viewWillAppear for certain views using tabBarController?.tabBar.isHidden = true OR 2) you can use present(_ viewController: UIViewController, animated: Bool, completion: ()-> Void) which will present a ViewController which will not have a tabBar on the bottomMikeG

1 Answers

0
votes

If the ViewController of the side menu is different than the TabBar. You can PUSH the view directly in the controller that is selected in the tabbar in that moment.