Instance Property


The style associated with the user interface.


var userInterfaceStyle: UIUserInterfaceStyle { get }


Use this trait to determine whether your interface should be configured with a dark or light appearance. The default value of this trait is set to the corresponding appearance setting on the user's device.

The user interface style is available for trait environments with a userInterfaceIdiom value of:

See Also

Retrieving Interface-Related Traits

var userInterfaceIdiom: UIUserInterfaceIdiom

The user interface idiom of the trait collection.

enum UIUserInterfaceIdiom

The interface type for the device or an object that has a trait environment, such as a view and view controller.

var forceTouchCapability: UIForceTouchCapability

The force touch capability value of the trait collection.

enum UIForceTouchCapability

Keys that indicate the availability of 3D Touch on a device. Only certain devices support 3D Touch. On those that do, the user can disable 3D Touch in the Accessibility area in Settings.

var layoutDirection: UITraitEnvironmentLayoutDirection

The layout direction associated with the current environment.

enum UITraitEnvironmentLayoutDirection

Constants indicating the layout direction associated with the current environment.

enum UIUserInterfaceStyle

Constants indicating the interface style for the app.