I have a few UIViewControllers that present on top of one another using modalPresentationStyle = .fullScreen
. I want to present another one on top using the .automatic
style. This works okay, but does not have the card-like style as expected (where the view controller underneath shrinks away). Is there any way I can achieve this style?
I tried making the current view controller the root view controller as such:
UIApplication.shared.keyWindow?.rootViewController = self.navigationController
This works partially, but I end up with a strange white void instead of the expected black abyss behind the cards. I tried explicitly setting the background color of the window to black:
UIApplication.shared.keyWindow?.backgroundColor = .black
However, this did not change anything.