TreeViewDataSource
public protocol TreeViewDataSource : AnyObject
Undocumented
-
If
true
, this signals the tree view that the item should be rendered with a UI hint that it can be expanded.Declaration
Swift
func hasSubItems(at index: TreeView.ItemIndex) -> Bool
-
Returns the total number of sub-items at a given hierarchical index.
Declaration
Swift
func numberOfItems(at hierarchyIndex: TreeView.HierarchyIndex) -> Int
-
Gets the display label for the item at a given index.
Declaration
Swift
func titleForItem(at index: TreeView.ItemIndex) -> AttributedText
-
iconForItem(at:
Default implementation) Gets the optional icon for the item at a given index. If
nil
, the item is rendered without an icon.Default Implementation
Declaration
Swift
func iconForItem(at index: TreeView.ItemIndex) -> Image?