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


enum UIUserInterfaceIdiom : Int



case unspecified

An unspecified idiom.

case phone

An interface designed for iPhone and iPod touch.

case pad

An interface designed for iPad.

case tv

An interface designed for tvOS and Apple TV.

case carPlay

An interface designed for an in-car experience.

See Also

Retrieving Interface-Related Traits

var userInterfaceStyle: UIUserInterfaceStyle

The style associated with the user interface.

enum UIUserInterfaceStyle

Constants indicating the interface style for the app.

var userInterfaceIdiom: UIUserInterfaceIdiom

The user interface idiom of the trait collection.

var userInterfaceLevel: UIUserInterfaceLevel

The elevation level of the interface.

enum UIUserInterfaceLevel

Constants indicating the visual level for content in the window.

var layoutDirection: UITraitEnvironmentLayoutDirection

The layout direction associated with the current environment.

enum UITraitEnvironmentLayoutDirection

Constants indicating the layout direction associated with the current environment.

var accessibilityContrast: UIAccessibilityContrast

The accessibility contrast associated with the current environment.

enum UIAccessibilityContrast

Constants indicating the accessibility contrast setting.

var legibilityWeight: UILegibilityWeight

The font weight to apply to text.

enum UILegibilityWeight

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