<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSView/isHiddenOrHasHiddenAncestor",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSView(py)hiddenOrHasHiddenAncestor"
  },
  "title" : "isHiddenOrHasHiddenAncestor"
}
-->

# isHiddenOrHasHiddenAncestor

A Boolean value indicating whether the view is hidden from sight because it, or one of its ancestors, is marked as hidden.

```
var isHiddenOrHasHiddenAncestor: Bool { get }
```

## Discussion

The value of this property is <doc://com.apple.documentation/documentation/Swift/true> if the value of the [`isHidden`](/documentation/AppKit/NSView/isHidden) property is <doc://com.apple.documentation/documentation/Swift/true> for the current view or any of its ancestors in the view hierarchy. This property does not account for other reasons why a view might be considered hidden, such as being positioned outside its superview’s bounds, not having a window, or residing in a window that is offscreen or overlapped by another window.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)