---
title: "decodeUIEdgeInsets(forKey:)"
framework: foundation
role: symbol
role_heading: Instance Method
path: "foundation/nscoder/decodeuiedgeinsets(forkey:)"
---

# decodeUIEdgeInsets(forKey:)

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

## Declaration

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

## Parameters

- `key`: The key that identifies the edge insets.

## Return Value

Return Value The edge insets data.

## Discussion

Discussion Use this method to decode edge inset information that was previously encoded using the encode(_:forKey:) method.

## See Also

### Related Documentation

- [encode(_:forKey:)](foundation/nscoder/encode(_:forkey:)-44zsc.md)

### Decoding Geometry-Based Data

- [decodeCGAffineTransform(forKey:)](foundation/nscoder/decodecgaffinetransform(forkey:).md)
- [decodeCGPoint(forKey:)](foundation/nscoder/decodecgpoint(forkey:).md)
- [decodeCGRect(forKey:)](foundation/nscoder/decodecgrect(forkey:).md)
- [decodeCGSize(forKey:)](foundation/nscoder/decodecgsize(forkey:).md)
- [decodeCGVector(forKey:)](foundation/nscoder/decodecgvector(forkey:).md)
- [decodeDirectionalEdgeInsets(forKey:)](foundation/nscoder/decodedirectionaledgeinsets(forkey:).md)
- [decodeUIOffset(forKey:)](foundation/nscoder/decodeuioffset(forkey:).md)
