currentContext 和 overCurrentContext 有什么区别?

What's the difference between currentContext and overCurrentContext?

currentContextoverCurrentContextdocs 具有相同的描述。

我能发现的差异是:

还有什么不同吗?

fullScreenoverFullScreen的区别完全一样。第一个从它覆盖的区域中删除视图;第二个没有,它只是覆盖它。

(在这两种情况下,如果您呈现的视图控制器的主视图的背景颜色具有一定的透明度,这种差异在视觉上很容易看出。但是行为的差异更为重要;一些视图在突然被撕掉时变得不愉快视图层次结构,因此最好将它们留在原地并使用 .over 变体。)

With currentContext, after dismissing the presented view controller, viewWillAppear of the covered view controller gets called (which doesn't have to be the view controller that provides the context). With overCurrentContext it does not get called.

这只是我刚才所说的结果。对于 overviewWillAppear 不会在解雇时被调用,因为视图从一开始就没有消失;它只是坐在呈现的视图后面。同样,这与 fullScreenoverFullScreen.

完全平行