---
title: UIViewConfigurationState
framework: uikit
role: symbol
role_heading: Structure
path: uikit/uiviewconfigurationstate-swift.struct
---

# UIViewConfigurationState

A structure that encapsulates a view’s state.

## Declaration

```swift
struct UIViewConfigurationState
```

## Overview

Overview A view configuration state encompasses a trait collection along with all of the common states that affect a view’s appearance — states like selected, focused, or disabled. A view configuration state encapsulates the inputs that configure a view for any possible state or combination of states. You use a view 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. You can create your own custom states to add to a view configuration state by defining a custom state key using UIConfigurationStateCustomKey.

## Topics

### Managing view configuration states

- [isSelected](uikit/uiviewconfigurationstate-swift.struct/isselected.md)
- [isHighlighted](uikit/uiviewconfigurationstate-swift.struct/ishighlighted.md)
- [isFocused](uikit/uiviewconfigurationstate-swift.struct/isfocused.md)
- [isDisabled](uikit/uiviewconfigurationstate-swift.struct/isdisabled.md)
- [isPinned](uikit/uiviewconfigurationstate-swift.struct/ispinned.md)

## Relationships

### Conforms To

- [Copyable](swift/copyable.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomReflectable](swift/customreflectable.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Escapable](swift/escapable.md)
- [Hashable](swift/hashable.md)
- [UIConfigurationState](uikit/uiconfigurationstate-8d7pd.md)

## See Also

### Configuration states

- [UICellConfigurationState](uikit/uicellconfigurationstate-swift.struct.md)
- [UIConfigurationState](uikit/uiconfigurationstate-8d7pd.md)
- [UIConfigurationStateCustomKey](uikit/uiconfigurationstatecustomkey.md)
