View a programmatic view
2 answers
You can use the following if you have embedded in the navigation controller.
UIStoryboard *myStoryBoard =[UIStoryboard storyboardWithName:@"Story_Board_Name" bundle:nil];
UITabBarController *tabBarController = [myStoryBoard instantiateViewControllerWithIdentifier:@"TABid"];
self.tabBarController.selectedIndex = 0;
[self.navigationController pushViewController:self.tabBarController animated:YES];
Or try this
UIStoryboard *myStoryBoard =[UIStoryboard storyboardWithName:@"Story_Board_Name" bundle:nil];
UITabBarController *tabBarController = [myStoryBoard instantiateViewControllerWithIdentifier:@"TABid"];
self.tabBarController.selectedIndex = 0;
[self performSegueWithIdentifier:@"s1" sender:self];
+3
source to share
Give your tabbarcontroller an id from storyboard, do something like this
UIStoryboard *myStoryBoard =[UIStoryboard storyboardWithName:@"Your_Story_Board_Name" bundle:nil];
TabViewController *tabBarController = [myStoryBoard instantiateViewControllerWithIdentifier:@"TAB_Identifier"];
[self presentViewController:tabBarController animated:YES completion:nil];
Hope it helps
0
source to share