UINavigationController animation

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?

Answers


Try using [self.navigationController popToRootViewControllerAnimated:YES];

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


Need Your Help

Word Macros Problem: MsgBox function appears to lock all open windows of word

ms-word word-vba

I have some macros that run in Word. We are migrating to Office 2007.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.