<!--
{
  "availability" : [
    "macOS: 10.13.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSUserInterfaceCompression/compress(withPrioritizedCompressionOptions:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(pl)NSUserInterfaceCompression(im)compressWithPrioritizedCompressionOptions:"
  },
  "title" : "compress(withPrioritizedCompressionOptions:)"
}
-->

# compress(withPrioritizedCompressionOptions:)

Compress the view by applying the specified compression options.

```
func compress(withPrioritizedCompressionOptions prioritizedOptions: [NSUserInterfaceCompressionOptions])
```

## Parameters

`prioritizedOptions`

An array of compression options that the view should apply to reduce its size.

## Discussion

When the system calls this method, the view should resize itself according to the compression options supplied.

Compression options that are handled by the system are not included in the supplied array.

---

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)