Contents

begin(completionHandler:)

Presents the panel as a modeless window.

Declaration

func begin(completionHandler handler: @escaping (NSApplication.ModalResponse) -> Void)
func begin() async -> NSApplication.ModalResponse

Parameters

  • handler:

    The block to call after the user closes the panel. This block has no return value and takes a single parameter:

    result

    The action taken by the user. The value of this parameter is Nsfilehandlingpanelokbutton if the user chose the OK button or Nsfilehandlingpanelcancelbutton if the user chose the Cancel button.

Discussion

Configure all of the relevant properties of the panel before you call this method.

See Also

Showing the Panel