ListParser
public struct ListParserProvides helper function to convert between NSAttributedString and [ListItem]
- 
                  
                  Parses an array of list items into an NSAttributedStringrepresentation.NewLinesare automatically added between each list item in the attributed string representation.DeclarationSwift public static func parse(list: [ListItem], indent: CGFloat) -> NSAttributedStringParameterslistList items to convert indentIndentation to be used. This determines the paragraph indentation for layout. Return ValueNSAttributedString representation of list items 
- 
                  
                  Parses NSAttributedString to list items Note If NSAttributedString passed into the function is non continuous i.e. contains multiple lists, the array will contain items from all the list with the range corresponding to range of text in original attributed string.DeclarationSwift public static func parse(attributedString: NSAttributedString, indent: CGFloat = 25) -> [(listIndex: Int, range: NSRange, listItem: ListItem)]ParametersattributedStringNSAttributedString to convert to list items. indentIndentation used in list representation in attributedString. This determines the level of list item. Return ValueArray of list items with corresponding range in attributedString along with listIndexdenoting the index of list in the complete text. All items in the same list will have same index.listIndexmay be used to distinguish items of one list from another.
 View on GitHub
View on GitHub ListParser Structure Reference
        ListParser Structure Reference