Open KuldeepAIP opened 3 years ago
Firstly I have used AKSidemenu and when i press any item from sidemenu i move to particular controller like below.
let contentViewController: TestVC = GlobalData.testStoryBoard().instantiateViewController(withIdentifier: "TestVC") as! TestVC let navController = UINavigationController.init(rootViewController: contentViewController) self.sideMenuViewController!.setContentViewController(navController, animated: true) self.sideMenuViewController?.hideMenuViewController()
but now i want to use UITabBarController so after login i use AKSideMenu & UITabBarController like this.
UITabBarController
AKSideMenu
func setSideMenuAsRootViewController() { let ContentViewController: TabBarVC = GlobalData.tabBarStoryBoard().instantiateViewController(withIdentifier: "TabBarVC") as! TabBarVC let leftMenuViewController: LeftMenuVC = GlobalData.mainStoryBoard().instantiateViewController(withIdentifier: "LeftMenuVC") as! LeftMenuVC let sideMenuViewController: AKSideMenu = AKSideMenu(contentViewController: ContentViewController, leftMenuViewController: leftMenuViewController, rightMenuViewController: nil) self.window?.rootViewController = sideMenuViewController }
but now when i press any sidemenu item it moves to only UITabBar initial controller. here is my code.
UITabBar
let contentViewController: TabBarVC = GlobalData.tabBarStoryBoard().instantiateViewController(withIdentifier: "TabBarVC") as! TabBarVC self.sideMenuViewController!.setContentViewController(contentViewController, animated: true) self.sideMenuViewController?.hideMenuViewController()
1 solution to move UITabBar particular subcontroller is to use UITabBarController selectedIndex.
selectedIndex
If there's any proper solution to do that then please suggest me.
Firstly I have used AKSidemenu and when i press any item from sidemenu i move to particular controller like below.
but now i want to use
UITabBarController
so after login i useAKSideMenu
&UITabBarController
like this.but now when i press any sidemenu item it moves to only
UITabBar
initial controller. here is my code.1 solution to move
UITabBar
particular subcontroller is to useUITabBarController
selectedIndex
.If there's any proper solution to do that then please suggest me.