什么时候调用viewDidAppear? [英] when is viewDidAppear called?
问题描述
如果我有一个名为B的UIViewController。如果我将UIViewController C添加为B的子视图/子视图控制器。然后我将D添加为B的子视图控制器。然后我从B中删除D.在这种情况下,应该在之后调用C的viewDidAppear吗?
If I have a UIViewController called B. If I add UIViewController C as a subview/child view controller of B. Then I add in D as a child view controller of B too. I then remove D from B. In this case should C's viewDidAppear be called afterwards?
我问的原因是因为我没有得到B对viewDidAppear的调用。我计划在B被解雇时做点什么。
The reason I ask is because I am not getting B's call to viewDidAppear. I am planning to do something when B's dismissed.
推荐答案
viewDidAppear
将解雇模态视图时不调用。将模态视图视为视图顶部的视图。
viewDidAppear
will not be called when you dismiss a modal view. Think of a modal view as a view on top on the view.
这篇关于什么时候调用viewDidAppear?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!