Reputation: 604
I noticed that if I set views background color to transparent, the background color turns black (which I guess is default "viewport" color) after segue transition ends.
Can I change that? Of course I could just change color from transparent to purple, but maybe there is a way?
Upvotes: 0
Views: 390
Reputation: 10195
You should add this line:
self.navigationController?.modalPresentationStyle = UIModalPresentationStyle.CurrentContext
presentedViewController.modalPresentationStyle = UIModalPresentationStyle.OverCurrentContext
Before presenting:
self.presentViewController(presentedViewController, animated: true, completion: nil)
Upvotes: 1
Reputation: 25144
It's the default background color of your UIWindow
. Either set it from your app delegate :
self.window.backgroundColor = [UIColor whiteColor];
or by looking up the window of any view currently on-screen, in any view controller:
anyView.window.backgroundColor = ...
Upvotes: 2