以下是流程我想要Loginvc-> tabbarvcontroller(4tab)(也有左右侧边栏)
我的问题是
我想做 1)登录后隐藏后退按钮+添加左侧右侧栏+ tabbarcontroller
但是当我实现backbarbutton不是hide并且它加载了tabbarcontroller页面而不是tab1。
非常感谢
答案 0 :(得分:0)
尝试以下步骤:
1. set TabViewControllerID in storyboard . and then set tabbarView controller as rootviewcontroller of app delegate using app delegate object after successful login.
UITabBarController * tabBarController = [storyboard instantiateViewControllerWithIdentifier:@"TabbarControllerID"];
AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
appDelegate.window.rootViewController = tabBarController;
2 . Add left bar button in your tabViewController’s Viewcontroller .
3. and use MFSideMenu third party library for left and right menu.
for library:https://github.com/mikefrederick/MFSideMenu
答案 1 :(得分:0)
UIStoryboard*Storyboard=[AppDelegate storyBoardType];
tbTBC *tabvc=(tbTBC*)[Storyboard instantiateViewControllerWithIdentifier:@"tbTBCId"];
NSLog(@"tabvc controller ===>%@",tabvc.viewControllers);
tabvc.selectedIndex=3;//set tabbar index number to push on that particular tab bar
[self.revealViewController setFrontViewController:tabvc];
[self.revealViewController setFrontViewPosition: FrontViewPositionLeft animated: YES];