Instance Method


Asks the delegate to validate the URL for a file that the user selected.


optional func panel(_ sender: Any, validate url: URL) throws



The panel that requests URL validation.


The URL for you to validate.


If an error occurred during validation, the error that occurred.

Return Value

true if your app can open or save the item at the specified URL. Return false if you cannot open or save the item.


Save panels call this method when the user clicks the Save button. Open panels call it when the user clicks the Open button. An Open panel calls this method once for each selected filename or directory.

See Also

Validating the Panel Content

func panel(Any, shouldEnable: URL) -> Bool

Asks the delegate whether the specified URL should be enabled in the Open panel.