Instance Property

userInterfaceStyle

The style associated with the user interface.

Declaration

@property(nonatomic, readonly) UIUserInterfaceStyle userInterfaceStyle;

Discussion

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.

See Also

Retrieving Interface-Related Traits

UIUserInterfaceStyle

Constants indicating the interface style for the app.

userInterfaceIdiom

The user interface idiom of the trait collection.

UIUserInterfaceIdiom

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

userInterfaceLevel

The elevation level of the interface.

UIUserInterfaceLevel

Constants indicating the visual level for content in the window.

layoutDirection

The layout direction associated with the current environment.

UITraitEnvironmentLayoutDirection

Constants indicating the layout direction associated with the current environment.

accessibilityContrast

The accessibility contrast associated with the current environment.

UIAccessibilityContrast

Constants indicating the accessibility contrast setting.

legibilityWeight

The font weight to apply to text.

UILegibilityWeight

Constants indicating the weight to apply to text in your interface.