<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: 13.0.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NSCoder/decodeUIEdgeInsets(forKey:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(cs)NSCoder(im)decodeUIEdgeInsetsForKey:"
  },
  "title" : "decodeUIEdgeInsets(forKey:)"
}
-->

# decodeUIEdgeInsets(forKey:)

Decodes and returns the UIKit edge insets structure associated with the specified key in the coder’s archive.

```
func decodeUIEdgeInsets(forKey key: String) -> UIEdgeInsets
```

## Parameters

`key`

The key that identifies the edge insets.

## Return Value

The edge insets data.

## Discussion

Use this method to decode edge inset information that was previously encoded using the [`encode(_:forKey:)`](/documentation/Foundation/NSCoder/encode(_:forKey:)-44zsc) method.

## See Also

[`encode(_:forKey:)`](/documentation/Foundation/NSCoder/encode(_:forKey:)-44zsc)

Encodes edge inset data and associates it with the specified key in the coder’s archive.



---

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)