<!--
{
  "availability" : [
    "macOS: 10.9.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSStackView/visibilityPriority(for:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSStackView(im)visibilityPriorityForView:"
  },
  "title" : "visibilityPriority(for:)"
}
-->

# visibilityPriority(for:)

Returns the visibility priority for a specified view in the stack view.

```
func visibilityPriority(for view: NSView) -> NSStackView.VisibilityPriority
```

## Parameters

`view`

The view that you are getting the visibility priority for.

## Return Value

The visibility priority for the specified view.

## Discussion

Visibility priority is the Auto Layout priority for a view to remain attached to a stack view when Auto Layout reduces the stack view’s size (such as when a user reduces the enclosing window’s size).

---

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)