<!--
{
  "availability" : [
    "macOS: 10.11.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSTextContainer/lineBreakMode",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSTextContainer(py)lineBreakMode"
  },
  "title" : "lineBreakMode"
}
-->

# lineBreakMode

The behavior of the last line inside the text container.

```
var lineBreakMode: NSLineBreakMode { get set }
```

## Discussion

The [`NSLineBreakMode`](/documentation/AppKit/NSLineBreakMode) constants specify what happens when a line is too long for its container. For example, wrapping can occur on word boundaries (the default) or character boundaries, or the line can be clipped or truncated. The default value of this property is [`NSLineBreakMode.byWordWrapping`](/documentation/AppKit/NSLineBreakMode/byWordWrapping).

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)