NSParagraphStyle: lineBreakMode property
The lineBreakMode property is what happens when a line doesn't fit. The values are the same as for UILabel.lineBreakMode: 'byWordWrapping', 'byCharWrapping', 'byClipping', 'byTruncatingHead', 'byTruncatingTail', 'byTruncatingMiddle'.
Value
A string.
- Read-only; assigning to it throws
TypeError. To set a value, use the property of the same name onNSMutableParagraphStyle. - The default is
'byWordWrapping'. - A paragraph style is copied when it is put into an attributed string, so this value never changes inside the attributed string.
Examples
js
const style = NSParagraphStyle.defaultParagraphStyle;
console.log(style.lineBreakMode);Result: the console prints the default value.
Corresponding iOS API
NSParagraphStyle.lineBreakMode.