in my application i mentioned the tab bar controller with 2 tabs tab1 and tab2.And each tab having the navigation view controller with root view controllers.And my scenario is like below
tab1 -> viewcontroller1 (navigationcontroller rootviewcontroller) -> viewcontroller2.
So now i want to move directly from app delegate to view controller2.How is it possible.
I did this one like this in app delegate. But it's moving to viewcontroller1.
UIStoryboard *mainStoryboard = [UIStoryboard storyboardWithName:@"Main"
bundle: nil];
self.tabbarController = [mainStoryboard instantiateViewControllerWithIdentifier:@"tabbarcontroller"];
[self.tabbarController setSelectedIndex:1];
viewcontroller2 *view =(viewcontroller2 *) [mainStoryboard instantiateViewControllerWithIdentifier:@"view2"];
[self.tabbarController.navigationController pushViewController:view animated:YES];
self.window.rootViewController=self.tabbarController;