1

从我的 navigationController 我有两条路径:

navigationController --> ViewControllerA -- ViewControllerB(当前显示)。

和导航控制器--> ViewController1-->ViewController2。

我想从 ViewControllerB 转到 ViewController2。

这是我尝试过的:

[self.navigationController popToRootViewControllerAnimated:YES]; // Works fine
AppDelegate app* = [[UIApplication sharedApplication] delegate];
LocationsViewController*  locationsViewController = [[LocationsViewController alloc] initWithNibName:@"LocationsView" bundle:nil];

locationsViewController.title = @"Title";
[self.navigationController pushViewController:locationsViewController animated:YES];

self.navigationController pushViewController 不起作用。

我在 App 委托中引用了 viewController1 并尝试了 [app.viewController1 pushViewControler animated:YES];,但这也不起作用。

你怎么解决这个问题?

4

1 回答 1

1

弄清楚了。这有帮助。

http://discussions.apple.com/thread.jspa?threadID=2305421&tstart=0#10929636

显然,poptorootviewcontroller 不能动画,如果你在它上面推另一个视图控制器。

谢谢!

于 2010-08-23T01:27:16.170 回答