The iOS interface environment, which includes traits such as horizontal and vertical size class, display scale, and user interface idiom, is available to apps through the
UITraitEnvironment protocol. The following interface classes adopt this protocol:
- iOS 8.0+
- tvOS 9.0+
To access the trait environment of an object that adopts this protocol, use the
traitCollection property. The protocol also provides an overridable method that the system calls when the interface environment changes. Implement this method as part of creating an adaptive iOS app.