---
title: window
framework: appkit
role: symbol
role_heading: Instance Property
path: appkit/nsview/window
---

# window

The view’s window object, if it is installed in a window.

## Declaration

```swift
unowned(unsafe) var window: NSWindow? { get }
```

## Discussion

Discussion The value of this property is nil if the view is not currently installed in a window.

## See Also

### Getting the Related Objects

- [superview](appkit/nsview/superview.md)
- [subviews](appkit/nsview/subviews.md)
- [opaqueAncestor](appkit/nsview/opaqueancestor.md)
- [isDescendant(of:)](appkit/nsview/isdescendant(of:).md)
- [ancestorShared(with:)](appkit/nsview/ancestorshared(with:).md)
- [enclosingMenuItem](appkit/nsview/enclosingmenuitem.md)
- [enclosingScrollView](appkit/nsview/enclosingscrollview.md)
