Instance Method


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


optional func panel(_ sender: Any, shouldEnable url: URL) -> Bool



The panel that asks whether the URL should be enabled.


The URL for you to check.

Return Value

true if you want the panel to display the item at the specifed URL as enabled, or false to display it as disabled.


Save panels do not call this method; they always disable URLs. Implementations of this method should be fast to avoid stalling the user interface. Use panel(_:validate:) instead if processing will take a long time.

See Also

Validating the Panel Content

func panel(Any, validate: URL)

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