I'm trying to use UIAppearance to configure the style of my Apps. It works perfectly with the UI components like UIView or UIButton, but it doesn't with UIViewControllers. I would like to do something like:
let appearance = FirstViewController.appearance()
Is there a way to use UIAppearance with ViewControllers?



You don´t set the background color in a
viewControlleryou do set it on theviewControllersview. If you useUIView.appearance().backgroundColoryou will change the background of all views.So the answer to your question is no you can´t use
UIAppearanceto change theviewControllersbackground color.What you could do is the following:
Then use the inspector in your Storyboard to change
UIViewControllertoFirstViewController.