setNeedsUserInterfaceAppearanceUpdate()
Notifies the view controller that a change occurred that might affect the preferred interface style.
Declaration
func setNeedsUserInterfaceAppearanceUpdate()Discussion
UIKit calls this method to let the view controller know when system-level interface style changes occur. You can also call it to let UIKit know when you change your view controller in a way that affects the preferred user interface style.