从我的Navigation Controller中,我有两条路径:

navigationController-> viewControllera -ViewControllerb(当前显示)。

和navigationController-> 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 Animation:yes];,但这也不起作用。

你怎么解决这个问题?

有帮助吗?

解决方案

弄清楚了。这有所帮助。

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

显然,如果您在其顶部推动另一个视图控制器,那么PoptorootViewController将无法动画。

谢谢!

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top