I present a view controller(B) over another(A) where I want the background of B to be transparent so that A is still visible in the background.
Therefore, before presenting B, it's modalPresentationStyle
is set to be .overCurrentContext
and B has view.backgroundColor = UIColor.clear
so that the transparent background is present.
However when I dismiss B and return back to A, methods of A like viewDidAppear
, viewWillAppear
, etc. does not get re-triggered.
If I change the above modalPresentationStyle
to .fullScreen
, viewWillAppear
and such will get re-triggered when returned back to A but this time, I lose the transparent background.
All in all, how can I achieve both a transparent background on the presented view and re-trigger methods such as viewDidAppear
on A when I return back to A?