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

# init(CGSize:)

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

## Declaration

```swift
init(CGSize size: CGSize)
```

```swift
init(cgSize size: CGSize)
```

## Parameters

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

## Return Value

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

## See Also

### Related Documentation

- [CGSize](corefoundation/cgsize.md)

### Working with CoreGraphics Geometry Values

- [init(CGPoint:)](foundation/nsvalue/init(cgpoint:).md)
- [init(CGVector:)](foundation/nsvalue/init(cgvector:).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)
