Instance Property

traitCollection

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

Required.

Declaration

@property(nonatomic, readonly) UITraitCollection *traitCollection;

Discussion

UIViewController and UIView adopt the UITraitEnvironment protocol and expose this property.