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

# decodeCGPoint(forKey:)

Decodes and returns the Core Graphics point structure associated with the specified key in the coder’s archive.

## Declaration

```swift
func decodeCGPoint(forKey key: String) -> CGPoint
```

## Parameters

- `key`: The key that identifies the point.

## Return Value

Return Value The CGPoint structure.

## Discussion

Discussion Use this method to decode a point that was previously encoded using the encode(_:forKey:) method.

## See Also

### Related Documentation

- [encode(_:forKey:)](foundation/nscoder/encode(_:forkey:)-7z9kc.md)

### Decoding Geometry-Based Data

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