在我的应用程序中,我有一个容器ViewController
,它RootView
是UINavigationController
.
我Child ViewControllers
通过中的一个segmentedControl
在Toolbar
各种之间中转UINavigationController
。
其中一个Child views
推另一个View
在 上NavigationController
,保持ToolbarItems
。
使用后退按钮,我得到了返回到 的所需行为RootViewController
,但是任何以编程方式返回的尝试都不会改变view
.
popViewControllerAnimated
总是采用topViewController
堆栈但不更新视图。viewWillAppear
的Container ViewController
不会被这样称呼。所以我想知道后退按钮是否会执行任何其他不会在popViewControllerAnimated
. 也popViewControllerAnimated:YES
将冻结应用程序而不会引发错误。
我在这里先向您的帮助表示感谢。
编辑:好的,一个测试用例有点。
Stack 的 topViewController 中的 popViewControllerAnimated 可以正常工作。但是通过 SegmentedControll 对 popViewControllerAnimated 的调用不会。
我意识到我写这篇文章的方式可能有点混乱,稍后我会尽量让这一切变得更清楚一些。