0

I have a tabBar app with two tabs. Each tab has its own navigationController implemented this way:

FirstViewController *firstController = [[FirstViewController alloc] initWithNibName:@"FirstViewController" bundle:nil];
UINavigationController *firstNavController = [[UINavigationController alloc] initWithRootViewController:firstController];

SecondViewController *secondController = [[SecondViewController alloc] initWithNibName:@"SecondViewController" bundle:nil];
UINavigationController *secondNavController = [[UINavigationController alloc] initWithRootViewController:secondController];

tabBar.viewControllers = [NSArray arrayWithObjects:firstNavController, secondNavController, nil];

When I want to push a view into one tab I use this:

[self.navigationController pushViewController:activityController animated:YES];

And when I am on a pushed view and I want to pop the view I use:

[self.navigationController popViewControllerAnimated:YES];

The push animation works great but in the pop animation only the top bar (the NavigationController) gets animated and the view disappears without the animation. What can be wrong?

sergiocg90
  • 489
  • 2
  • 11
  • 24

1 Answers1

0

Try using [self.navigationController popToRootViewControllerAnimated:YES];

Instead of [self.navigationController popViewControllerAnimated:YES]; and tell me if this works. Remember for netsted navigation controllers.

Bot
  • 11,868
  • 11
  • 75
  • 131
Saad
  • 8,857
  • 2
  • 41
  • 51