Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I do same work but me call appdelegate after success of login response <code>[mAppDelegate loadTabbar];</code>//call function in delegate file to load tabbar view whom code is follow</p> <pre><code>#pragma mark - #pragma mark Load TabBar -(void)loadTabBar { self.tabBarController = [[UITabBarController alloc] init]; tabBarController.delegate = self; MyAlarmVC *myAlarmVC = [[MyAlarmVC alloc] initWithNibName:@"MyAlarmVC" bundle:nil]; UINavigationController *myAlarmNVC = [[UINavigationController alloc] initWithRootViewController:myAlarmVC]; myAlarmNVC.navigationBar.tintColor = [UIColor whiteColor]; [myAlarmVC release]; MyVideosVC *myVideoVC = [[MyVideosVC alloc] initWithNibName:@"MyVideosVC" bundle:nil]; UINavigationController *myVideoNVC = [[UINavigationController alloc] initWithRootViewController:myVideoVC]; myVideoNVC.navigationBar.tintColor = [UIColor whiteColor]; [myVideoVC release]; MyFriendsVC *myFriendVC = [[MyFriendsVC alloc] initWithNibName:@"MyFriendsVC" bundle:nil]; UINavigationController *myFriendNVC = [[UINavigationController alloc] initWithRootViewController:myFriendVC]; myFriendNVC.navigationBar.tintColor = [UIColor whiteColor]; [myFriendVC release]; MyMessageVC *myMessageVC = [[MyMessageVC alloc] initWithNibName:@"MyMessageVC" bundle:nil]; UINavigationController *myMessageNVC = [[UINavigationController alloc] initWithRootViewController:myMessageVC]; myMessageNVC.navigationBar.tintColor = [UIColor whiteColor]; [myMessageVC release]; MyProfileVC *myProfileVC = [[MyProfileVC alloc] initWithNibName:@"MyProfileVC" bundle:nil]; UINavigationController *myProfileNVC = [[UINavigationController alloc] initWithRootViewController:myProfileVC]; myProfileNVC.navigationBar.tintColor = [UIColor whiteColor]; [myProfileVC release]; tabBarController.viewControllers = [NSArray arrayWithObjects:myAlarmNVC,myVideoNVC, myFriendNVC,myMessageNVC,myProfileNVC, nil]; [myAlarmNVC release]; [myVideoNVC release]; [myProfileNVC release]; [myFriendNVC release]; [myMessageNVC release]; [self.window addSubview:tabBarController.view ]; //tabBarController.navigationController.navigationBarHidden = YES; [self.tabBarController release]; } - (void)tabBarController:(UITabBarController *)tabBarController1 didSelectViewController:(UIViewController *)viewController{ NSArray *vc= tabBarController1.viewControllers; for (int i = 0; i &lt; [vc count]; i++) { UINavigationController *nc = [vc objectAtIndex:i]; if (nc == tabBarController1.selectedViewController) { continue; } [nc popToRootViewControllerAnimated:NO]; } } </code></pre> <p>if you got problem then just tell me the view names of your tabbar</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload