UINavigationController,强制堆栈

时间:2015-07-23 01:18:57

标签: ios uinavigationcontroller

关于UINavigationController的问题

我们说我有5个UiViewController,每个人推动下一个。

vc1 - > vc2 - > vc3 - > vc4 - > VC5
vc1< - vc2< - vc3< - vc4< - vc5

如果我想在vc1上添加一个推送到vc4的UIButton,但我也希望vc4在popViewController上转到vc3

vc1 - > - > VC4
vc1< - vc2< - vc3< - vc4

是最好的使用方式:?

[self.navigationController setViewControllers:newViewControllers animated:NO];

1 个答案:

答案 0 :(得分:1)

如果您使用

gitk
bash: gitk: command not found

没有动画

所以,试试这个在vc1

[self.navigationController setViewControllers:newViewControllers animated:NO];