---
title: "init(CGVector:)"
framework: foundation
role: symbol
role_heading: Initializer
path: "foundation/nsvalue/init(cgvector:)"
---

# init(CGVector:)

Creates a new value object containing the specified CoreGraphics vector structure.

## Declaration

```swift
init(CGVector vector: CGVector)
```

```swift
init(cgVector vector: CGVector)
```

## Parameters

- `vector`: The value for the new object.

## Return Value

Return Value A new value object that contains the vector information.

## See Also

### Related Documentation

- [CGVector](corefoundation/cgvector.md)

### Working with CoreGraphics Geometry Values

- [init(CGPoint:)](foundation/nsvalue/init(cgpoint:).md)
- [init(CGSize:)](foundation/nsvalue/init(cgsize:).md)
- [init(CGRect:)](foundation/nsvalue/init(cgrect:).md)
- [init(CGAffineTransform:)](foundation/nsvalue/init(cgaffinetransform:).md)
- [cgPointValue](foundation/nsvalue/cgpointvalue.md)
- [cgVectorValue](foundation/nsvalue/cgvectorvalue.md)
- [cgSizeValue](foundation/nsvalue/cgsizevalue.md)
- [cgRectValue](foundation/nsvalue/cgrectvalue.md)
- [cgAffineTransformValue](foundation/nsvalue/cgaffinetransformvalue.md)
