Dismissing modal view controller stack

后端 未结 3 463
日久生厌
日久生厌 2021-01-05 14:43

Given the following view controller layout.

We build a stack of modal view controllers by first presenting B on A and then present

3条回答
  •  攒了一身酷
    2021-01-05 15:28

    I am guessing that your segue from A to B is modal as well? In that case the dismiss function called from A wants to dismiss the view, which is immediately on top of A, which is B. C just gets hidden in order to show you the animated hiding of B. In that sense you cannot stack views via modal segues and dismiss the top one with the dismiss function as you described if you go that far back. The dismiss would work as intended if called from B to dismiss C though.

提交回复
热议问题