在从一个 ViewController
到 ViewController
的 segue 之间使用 UINavigationController
有什么好处?
没有 UINavigationController
也可以做到。并分别添加导航栏和返回按钮
最佳答案
在从一个 ViewController 到 ViewController 的 segue 之间使用 UINavigationController 的优点是您可以使用 UINavigationItem 返回上一个 ViewController。
像这样,
这就是您不需要实现转换的原因。但这是原因之一。
如果你想了解更多关于 UINavigationController 的细节,你可以看看。
https://developer.apple.com/library/ios/documentation/UIKit/Reference/UINavigationController_Class/
UINavigationController 中有很多有用的方法。
因此,使用 UINavigationController 的 segue 还是只使用 segue 哪个更好取决于您的情况。如果您不知道哪个更好,请在 stackoverflow 中再次提问。
关于ios - 通过 UINavigationController 进行 segue 的优势,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32334006/