<!--
{
  "availability" : [
    "macOS: 10.6.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSBrowserDelegate/browser(_:previewViewControllerForLeafItem:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(pl)NSBrowserDelegate(im)browser:previewViewControllerForLeafItem:"
  },
  "title" : "browser(_:previewViewControllerForLeafItem:)"
}
-->

# browser(_:previewViewControllerForLeafItem:)

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

```
@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.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)