CTLineCreateWithAttributedString(_:)
Creates a single immutable line object from an attributed string.
Declaration
func CTLineCreateWithAttributedString(_ attrString: CFAttributedString) -> CTLineParameters
- attrString:
The string that creates the line.
Return Value
A reference to a CTLine object.
Discussion
This function allows clients to create a line without creating a CTTypesetter object. The framework provides a typesetter for single-line typesetting under the hood. Simple elements that don’t require line breaks, such as text labels, can use this API.
See Also
Related Documentation
CTTypesetterCreateWithAttributedString(_:)CTTypesetterCreateWithAttributedStringAndOptions(_:_:)CTTypesetterCreateLine(_:_:)