Link Search Menu Expand Document

TraitEnvironment

A set of methods that makes the interface environment available to your application.

public protocol TraitEnvironment 

Requirements

traitCollection

The traits, such as the size class and scale factor, that describe the current environment of the object.

var traitCollection: TraitCollection 

traitCollectionDidChange(_:​)

Called when the interface environment changes.

func traitCollectionDidChange(_ previousTraitCollection: TraitCollection?)