---
title: "layoutManager(_:shouldBreakLineByWordBeforeCharacterAt:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/nslayoutmanagerdelegate/layoutmanager(_:shouldbreaklinebywordbeforecharacterat:)"
---

# layoutManager(_:shouldBreakLineByWordBeforeCharacterAt:)

Asks the delegate whether to break the line at the specified word.

## Declaration

```swift
optional func layoutManager(_ layoutManager: NSLayoutManager, shouldBreakLineByWordBeforeCharacterAt charIndex: Int) -> Bool
```

## Parameters

- `layoutManager`: The layout manager doing the layout.
- `charIndex`: Index of the character delimiting the break point search.

## Return Value

Return Value true if the current line break point is acceptable; false if the layout manager should find the next break point opportunity before charIndex.

## See Also

### Handling line fragments

- [layoutManager(_:shouldBreakLineByHyphenatingBeforeCharacterAt:)](uikit/nslayoutmanagerdelegate/layoutmanager(_:shouldbreaklinebyhyphenatingbeforecharacterat:).md)
- [layoutManager(_:lineSpacingAfterGlyphAt:withProposedLineFragmentRect:)](uikit/nslayoutmanagerdelegate/layoutmanager(_:linespacingafterglyphat:withproposedlinefragmentrect:).md)
- [layoutManager(_:paragraphSpacingAfterGlyphAt:withProposedLineFragmentRect:)](uikit/nslayoutmanagerdelegate/layoutmanager(_:paragraphspacingafterglyphat:withproposedlinefragmentrect:).md)
- [layoutManager(_:paragraphSpacingBeforeGlyphAt:withProposedLineFragmentRect:)](uikit/nslayoutmanagerdelegate/layoutmanager(_:paragraphspacingbeforeglyphat:withproposedlinefragmentrect:).md)
- [layoutManager(_:boundingBoxForControlGlyphAt:for:proposedLineFragment:glyphPosition:characterIndex:)](uikit/nslayoutmanagerdelegate/layoutmanager(_:boundingboxforcontrolglyphat:for:proposedlinefragment:glyphposition:characterindex:).md)
- [layoutManager(_:shouldSetLineFragmentRect:lineFragmentUsedRect:baselineOffset:in:forGlyphRange:)](uikit/nslayoutmanagerdelegate/layoutmanager(_:shouldsetlinefragmentrect:linefragmentusedrect:baselineoffset:in:forglyphrange:).md)
