textContentStorage(_:textParagraphWith:)
Returns a custom paragraph for a range that you provide from the object’s attributed string.
Declaration
optional func textContentStorage(_ textContentStorage: NSTextContentStorage, textParagraphWith range: NSRange) -> NSTextParagraph?Parameters
- textContentStorage:
The object’s content manager.
- range:
The Nsrange C.struct that describes the extent of the string.
Return Value
A new NSTextParagraph, or nil.
Discussion
When non-nil, textContentStorage uses the text paragraph instead of creating the standard NSTextParagraph with the attributed substring in range. The attributed string for a custom text paragraph must have a length of range.length.