Returns the document object whose window controller owns a specified window.
SDK
- macOS 10.0+
Framework
- App
Kit
Declaration
func document(for window: NSWindow) -> NSDocument?
Parameters
window
The window owned by the window controller.
Return Value
The document object whose window controller owns window
. Returns nil
if window
is nil
, if window
has no window controller, or if the window controller does not have an association with an instance of NSDocument
.