PDFList
public class PDFList : PDFDocumentObject
extension PDFList: CustomDebugStringConvertible
extension PDFList: CustomStringConvertible
Creates a new bullet list or numbered list with multiple, indented levels.
Each list item has a pre spacing between the page indentation to the left side of the symbol, and a past spacing at
the right side of the symbol.
let list = PDFList(indentations: [(pre: 0.0, past: 20.0), (pre: 20.0, past: 20.0), (pre: 40.0, past: 20.0)])
-
Items in this list
Declaration
Swift
public var items: [PDFListItem] -
Spacing before and after the symbol for each nesting level
Declaration
Swift
public var levelIndentations: [(pre: CGFloat, past: CGFloat)] -
Creates a new list
Declaration
Swift
public init(indentations: [(pre: CGFloat, past: CGFloat)])Parameters
indentationsSpacing before and after the symbol for each nesting level. If not enough indentation levels are provided, the default value
0will be used forpreandpast. -
Adds the given
itemto this listDeclaration
Swift
@discardableResult public func addItem(_ item: PDFListItem) -> PDFListParameters
itemItem to add
Return Value
Reference to this instance, useful for chaining
-
Appends the given
itemsto this listDeclaration
Swift
@discardableResult public func addItems(_ items: [PDFListItem]) -> PDFListParameters
itemsItems to append
Return Value
Reference to this instance, useful for chaining
-
Count of items in this list
Declaration
Swift
public var count: Int { get } -
Converts the added instances of
PDFListItemfrom a nested structure into an array of tuplesDeclaration
Swift
public func flatted() -> [(level: Int, text: String, symbol: PDFListItemSymbol)]Return Value
Array of tuples with
level,textandsymbolfor each item
-
nodoc
Declaration
Swift
override public func isEqual(to other: PDFDocumentObject) -> Bool
-
nodoc
Declaration
Swift
override public func hash(into hasher: inout Hasher)
-
nodoc
Declaration
Swift
public var debugDescription: String { get }
-
nodoc
Declaration
Swift
public var description: String { get }
View on GitHub
Install in Dash