Display status bar's text in white
Inside the affected view controller, add the following definition:
override var preferredStatusBarStyle: UIStatusBarStyle {
return .lightContent
}
Define margins for a background image
When an element has a background image in a Storyboard, it might be necessary to adjust its margins on the Swift side:
element.imageEdgeInsets = UIEdgeInsetsMake(top, left, bottom, right)
Display a UIViewController
First, in the Storyboard, there should be a scene that is mapped to the controller class we want to display. If the current controller and the one that should be displayed are in different storyboards:
let vc = UIStoryboard.init(name: "OtherStoryboard", bundle: Bundle.main)
.instantiateViewController(withIdentifier: "OtherControllerId")
as! OtherControllerClass
self.present(vc, animated: true, completion: nil)
If both controllers are in the same Storyboard :
let vc = self.storyboard?
.instantiateViewController(withIdentifier: "OtherControllerId")
as! OtherControllerClass
self.present(vc, animated: true, completion: nil)