<!--
{
  "availability" : [
    "iOS: 14.0.0 -",
    "iPadOS: 14.0.0 -",
    "macCatalyst: -",
    "tvOS: 14.0.0 -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIConfigurationState-8d7pd/subscript(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Subscript",
  "symbol" : {
    "kind" : "Instance Subscript",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "s:5UIKit20UIConfigurationStatePys11AnyHashableVSgSo0bC9CustomKeyacip"
  },
  "title" : "subscript(_:)"
}
-->

# subscript(_:)

Accesses custom states by key.

```
subscript(key: UIConfigurationStateCustomKey) -> AnyHashable? { get set }
```

---

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)