pushViewController problem

Sometimes, I want to push some view controller into the navigation controller before the view is shown, then I called

[ self.navigationController pushViewController:[rootController autorelease] animated:NO]; // push root view controller

Where animated is set to NO to prevent animation. However, the above code doesn't work. When clicking back button, the view cannot return to previous view. After spending many hours, I found that it may be a bug in the SDK. If I set animated to YES, everything works fine:

[ self.navigationController pushViewController:[rootController autorelease] animated:YES]; // push root view controller

Comments :

Same problem: can't find solution

It seems this is even more of a problem in 3.0 as it has the same behavior with animated:YES when called before the ViewController is shown. Did you ever get a way to do this without using animated:YES?

Fixed

Got it fixed by eliminating nibs.