overFullScreen與fullScreen區(qū)別
overFullScreen
The views beneath the presented content are not removed from the view hierarchy when the presentation finishes. So if the presented view controller does not fill the screen with opaque content, the underlying content shows through.
當(dāng)顯示結(jié)束時,顯示內(nèi)容下面的視圖不會從視圖層次結(jié)構(gòu)中刪除。因此,如果呈現(xiàn)的視圖控制器沒有用不透明的內(nèi)容填充屏幕,底層內(nèi)容就會顯示出來。
fullScreen
The views belonging to the presenting view controller are removed after the presentation completes.
屬于呈現(xiàn)視圖控制器的視圖在呈現(xiàn)完成后被移除。
詳見Xcode->Window->Developer Documentation。
總結(jié)
如果需要彈出半透明視圖使用overFullScreen,但是由于當(dāng)顯示結(jié)束時,顯示內(nèi)容下面的視圖不會從視圖層次結(jié)構(gòu)中刪除,所以頁面消失時下面的視圖不會出發(fā)viewWillAppear等方法。
使用fullScreen,在頁面消失會觸發(fā)下面的視圖的viewWillAppear等方法,但是呈現(xiàn)視圖控制器的視圖在呈現(xiàn)完成后被移除實現(xiàn)半透明時透明部分直接黑屏展示。
??與熊掌不可兼得??????。