ListItem
public struct ListItem
Represents an item in the list. This structure may be used to create NSAttributedString from items in an array of ListItem. Alternatively, NSAttributedString may also be parsed to get an array of ListItems.
-
Text of the list item. All attributes are preserved as is.
Note
If the text contains a newline (\n), it is preserved as a newline in text by applying.skipNextListMarkerattribute.Declaration
Swift
public let text: NSAttributedString -
Level of the list item. This is used with indent to get
paragraphStyleto be applied with appropriate indentation of the list items.Declaration
Swift
public let level: Int -
Attribute value of the list item.
Declaration
Swift
public let attributeValue: Any -
Creates a
ListItemDeclaration
Swift
public init(text: NSAttributedString, level: Int, attributeValue: Any)Parameters
textAttributed value for text in
ListItemlevelIndentation level of
ListItem.attributeValueAttribute value to be applied to entire text range of
ListItem
View on GitHub
ListItem Structure Reference