Contents

initWithTraitCollection:

Creates a view configuration state with the specified trait collection.

Declaration

- (instancetype) initWithTraitCollection:(UITraitCollection *) traitCollection;

Discussion

Typically, you don’t create a configuration state yourself. To obtain a configuration state, override the updateConfiguration(using:) method in your view subclass and use the state parameter. Outside of this method, you can get a view’s configuration state by using its configurationState property.

See Also

Creating a configuration state manually