---
title: size
framework: uikit
role: symbol
role_heading: Instance Property
path: uikit/nstextcontainer/size
---

# size

The size of the text container’s bounding rectangle.

## Declaration

```swift
var size: CGSize { get set }
```

## Discussion

Discussion This property defines the maximum size for the layout area returned from lineFragmentRect(forProposedRect:at:writingDirection:remaining:). A value of 0.0 or less means no limitation. If you don’t specify an explicit size when you initialize a text container, the system uses a default large size of (10000000.0, 10000000.0).

## See Also

### Defining the container shape

- [exclusionPaths](uikit/nstextcontainer/exclusionpaths.md)
- [lineBreakMode](uikit/nstextcontainer/linebreakmode.md)
- [widthTracksTextView](uikit/nstextcontainer/widthtrackstextview.md)
- [heightTracksTextView](uikit/nstextcontainer/heighttrackstextview.md)
