Contents

representedURL

A URL of the file or resource represented in the window.

Declaration

var representedURL: URL? { get set }

Discussion

The window shows a documentation icon in the title bar when this property isn’t nil and the URL has a non-empty path. If the URL represents a filename or other resource with a known icon, the window displays that icon as the document icon; otherwise, the window displays a default document icon.

When the windows displays a document icon, a pop-up menu is also available by Command-clicking the area containing the icon and title. The pop-up menu displays the path components of the URL.

If representedURL is nil or the URL path is empty, the document icon and pop-up menu aren’t available.

See Also

Configuring the title bar