I am creating tabbarcontroller using IB that contain 5 tabs, Every tab contain series of view controller.
tab1- view1-view2
tab2 - view3
tab3 - view4-view5-view6
tab4 - view7
tab5 - view8-view9
here i am using uilocalnotification after clicking on notification i want to open view6 from tab3.
This is my code
- (void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification {
UIApplicationState state = [application applicationState];
if (state == UIApplicationStateInactive) {
application.applicationIconBadgeNumber = 0;
[[UIApplication sharedApplication] cancelAllLocalNotifications];
view6 *v6 = [[view6 alloc] initWithNibName:@"view6" bundle:nil];
[v6 showmyvalues]; //showmyvalues is the method in view6
}
}
I also try this code
view6 *v6 = [[view6 alloc] initWithNibName:@"view6" bundle:nil];
UINavigationController *navigationController =
[[UINavigationController alloc] v6];
[tabBarController.selectedViewController.navigationController
pushViewController:navigationController animated:YES];