---
title: "compress(withPrioritizedCompressionOptions:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nsuserinterfacecompression/compress(withprioritizedcompressionoptions:)"
---

# compress(withPrioritizedCompressionOptions:)

Compress the view by applying the specified compression options.

## Declaration

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

## Parameters

- `prioritizedOptions`: An array of compression options that the view should apply to reduce its size.

## Discussion

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.
