<!--
{
  "availability" : [
    "iOS: 17.0.0 -",
    "iPadOS: 17.0.0 -",
    "macCatalyst: -",
    "tvOS: 17.0.0 -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIContentUnavailableConfigurationState-swift.struct",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "s:5UIKit38UIContentUnavailableConfigurationStateV"
  },
  "title" : "UIContentUnavailableConfigurationState"
}
-->

# UIContentUnavailableConfigurationState

A structure that encapsulates state for a content-unavailable view.

```
struct UIContentUnavailableConfigurationState
```

## Overview

Typically, you don’t create a configuration state yourself. To obtain a configuration state, override [`updateContentUnavailableConfiguration(using:)`](/documentation/UIKit/UIViewController/updateContentUnavailableConfiguration(using:)) in your view controller subclass and use the state parameter. Outside of this method, you can get a view controller’s configuration state from the [`contentUnavailableConfigurationState`](/documentation/UIKit/UIViewController/contentUnavailableConfigurationState-7sczw) property.

You can create your own custom states to add to a content-unavailable configuration state by defining a custom state key with [`UIConfigurationStateCustomKey`](/documentation/UIKit/UIConfigurationStateCustomKey).

## Topics

### Instance Properties

[`var searchText: String?`](/documentation/UIKit/UIContentUnavailableConfigurationState-swift.struct/searchText)

The search text.

## Relationships

### Conforms To

[`CustomReflectable`](/documentation/Swift/CustomReflectable)

[`Copyable`](/documentation/Swift/Copyable)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`UIConfigurationState-8d7pd`](/documentation/UIKit/UIConfigurationState-8d7pd)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`Escapable`](/documentation/Swift/Escapable)

[`Equatable`](/documentation/Swift/Equatable)

[`Hashable`](/documentation/Swift/Hashable)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)