<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "tvOS: 15.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/NSTextLayoutManagerDelegate/textLayoutManager(_:shouldBreakLineBefore:hyphenating:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(pl)NSTextLayoutManagerDelegate(im)textLayoutManager:shouldBreakLineBeforeLocation:hyphenating:"
  },
  "title" : "textLayoutManager(_:shouldBreakLineBefore:hyphenating:)"
}
-->

# textLayoutManager(_:shouldBreakLineBefore:hyphenating:)

The method the framework calls to determine the soft line break point.

```
optional func textLayoutManager(_ textLayoutManager: NSTextLayoutManager, shouldBreakLineBefore location: any NSTextLocation, hyphenating: Bool) -> Bool
```

## Parameters

`textLayoutManager`

The text layout manager.

`location`

The location of the proposed line break.

`hyphenating`

A Boolean value that indicates the current hyphenation mode.

## Return Value

A Boolean value that indicates if the framework should break the line at the current location.

## Discussion

When `hyphenating` is `false`, `NSTextLayoutManager` tries to find the next line break opportunity before `location`. When `hyphenating` is `true`, it’s an auto-hyphenation point.

---

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)