overrideUserInterfaceStyle
The user interface style adopted by the view and all of its subviews.
Declaration
var overrideUserInterfaceStyle: UIUserInterfaceStyle { get set }Mentioned in
Discussion
Use this property to force the view to always adopt a light or dark interface style. The default value of this property is UIUserInterfaceStyle.unspecified, which causes the view to inherit the interface style from a parent view or view controller. If you assign a different value, the new style applies to the view and all of the subviews owned by the same view controller. (If the view hierarchy contains the root view of an embedded child view controller, the child view controller and its views do not inherit the interface style.) If the view is a UIWindow object, the new style applies to everything in the window, including the root view controller and all presented content.