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
indentations
Spacing before and after the symbol for each nesting level. If not enough indentation levels are provided, the default value
0
will be used forpre
andpast
. -
Adds the given
item
to this listDeclaration
Swift
@discardableResult public func addItem(_ item: PDFListItem) -> PDFList
Parameters
item
Item to add
Return Value
Reference to this instance, useful for chaining
-
Appends the given
items
to this listDeclaration
Swift
@discardableResult public func addItems(_ items: [PDFListItem]) -> PDFList
Parameters
items
Items 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
PDFListItem
from 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
,text
andsymbol
for 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 }