Contents

browser(_:previewViewControllerForLeafItem:)

Asks the delegate for a controller that provides a preview column for the specified leaf item.

Declaration

@MainActor optional func browser(_ browser: NSBrowser, previewViewControllerForLeafItem item: Any) -> NSViewController?

Parameters

  • browser:

    The browser.

  • item:

    The leaf item.

Return Value

A view controller that provides a preview column, or nil to suppress the preview column.

Discussion

The returned controller’s represented object is set to the specified leaf item. This method is called only if the delegate implements the item data source methods.

See Also

Accessing Components