问题描述
我有以下情况:
视图控制器 A -> 模态呈现 -> 视图控制器 B
view controller A -> presents modally -> view controller B
视图控制器 B -> 模态呈现 -> 视图控制器 C
view controller B -> presents modally -> view controller C
我想关闭视图控制器C"并直接转到A"而不是显示B",因为当时显示B"没有意义.
I would like to dismiss view controller "C" and go directly to "A" instead of showing "B" since it do not make sense to show "B" at that time.
我怎样才能做到这一点?
How can I accomplish that ?
谢谢,丹尼尔
推荐答案
您可以使用 segue 来呈现来自其他视图控制器的视图控制器.
You can use segues to present view controllers from other view controllers.
要返回层次结构,您通常会关闭呈现的视图控制器,或者通过展开转场返回到特定的视图控制器.
To go backwards through a hierarchies you normally dismiss presented view controllers or you go back to specific view controllers through unwind segues.
这篇关于关闭呈现视图控制器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!