Contents

UIConfigurationState

The requirements for an object that encapsulates a view’s state.

Declaration

@protocol UIConfigurationState <NSObject, NSCopying, NSSecureCoding>

Overview

This protocol provides a blueprint for a configuration state object, which encompasses a trait collection along with all of the common states that affect a view’s appearance. A configuration state encapsulates the inputs that configure a view for any possible state or combination of states. You use a configuration state with background and content configurations to obtain the default appearance for a specific state.

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.

For more information, see UIViewConfigurationState and UICellConfigurationState.

Topics

Managing configuration states

Creating a configuration state manually

See Also

Configuration states