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

# decodeDirectionalEdgeInsets(forKey:)

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

## Declaration

```swift
func decodeDirectionalEdgeInsets(forKey key: String) -> NSDirectionalEdgeInsets
```

## Parameters

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

## Discussion

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

## See Also

### 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)
- [decodeUIEdgeInsets(forKey:)](foundation/nscoder/decodeuiedgeinsets(forkey:).md)
- [decodeUIOffset(forKey:)](foundation/nscoder/decodeuioffset(forkey:).md)
