<!--
{
  "availability" : [
    "macOS: 10.4.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Quartz",
  "identifier" : "/documentation/Quartz/IKFilterBrowserPanel/beginSheet(options:modalFor:modalDelegate:didEnd:contextInfo:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Quartz"
    ],
    "preciseIdentifier" : "c:objc(cs)IKFilterBrowserPanel(im)beginSheetWithOptions:modalForWindow:modalDelegate:didEndSelector:contextInfo:"
  },
  "title" : "beginSheet(options:modalFor:modalDelegate:didEnd:contextInfo:)"
}
-->

# beginSheet(options:modalFor:modalDelegate:didEnd:contextInfo:)

Displays the filter browser in a sheet—that is, a dialog that is attached to its parent window and must be dismissed by the user.

```
func beginSheet(options inOptions: [AnyHashable : Any]! = [:], modalFor docWindow: NSWindow!, modalDelegate: Any!, didEnd didEndSelector: Selector!, contextInfo: UnsafeMutableRawPointer!)
```

## Parameters

`inOptions`

A dictionary of options that describe the configuration to use for the filter browser user interface. For the possible keys you can supply see  [Filter Browser Option Keys](/documentation/Quartz/filter-browser-option-keys) and the constant [`IKUISizeFlavor`](/documentation/Quartz/IKUISizeFlavor).

`docWindow`

The parent window for the dialog.

`modalDelegate`

The object that will invoke the selector  `didEndSelector` when the filter browser session terminates.

`didEndSelector`

The selector to invoke when the filter browser session terminates.

`contextInfo`

Any data that must be passed as an argument to the delegate through `didEndSelector` after the filter browser session terminates.

## Discussion

When the filter browser session ends, `didEndSelector` is invoked on the modeless delegate, passing `contextInfo` as an argument. The selector `didEndSelector` must have the following signature:

`- (void)openPanelDidEnd:(NSOpenPanel *)panel returnCode:(int)returnCode  contextInfo:(void  *)contextInfo`

The `returnCode` value passed to the selector is set to <doc://com.apple.documentation/documentation/AppKit/NSOKButton> if the user validates, or to <doc://com.apple.documentation/documentation/AppKit/NSCancelButton> if the user cancels.

---

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)