If in an extension of an action I change the color of the navigation bar as follows:
class ActionViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() UINavigationBar.appearance().barTintColor = UIColor.green
Then the result will look like this: status bar in white:

But if the same line ( UINavigationBar.appearance().barTintColor ) is applied to the application (as opposed to the extension), then the result is different, for example, if the following line is added to the Xcode project of the main part template:
class MasterViewController: UITableViewController { override func viewDidLoad() { UINavigationBar.appearance().barTintColor = UIColor.green
Then this is the result when the status bar is also green:

How can I make the status bar appear green in an extension of an action?
ios
Gruntcakes
source share