---
title: maximumNumberOfLines
framework: appkit
role: symbol
role_heading: Instance Property
path: appkit/nstextcontainer/maximumnumberoflines
---

# maximumNumberOfLines

The maximum number of lines that the text container can store.

## Declaration

```swift
var maximumNumberOfLines: Int { get set }
```

## Discussion

Discussion The layout manager uses the value of this property to determine the maximum number of lines associated with the text container. The default value of this property is 0, which indicates that there is no limit.

## See Also

### Constraining text layout

- [lineFragmentPadding](appkit/nstextcontainer/linefragmentpadding.md)
- [lineFragmentRect(forProposedRect:at:writingDirection:remaining:)](appkit/nstextcontainer/linefragmentrect(forproposedrect:at:writingdirection:remaining:).md)
- [isSimpleRectangularTextContainer](appkit/nstextcontainer/issimplerectangulartextcontainer.md)
