<!--
{
  "availability" : [
    "ProVideo Encoder Extensions: 1.0.0 -",
    "macOS: 10.5.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Professional Video Applications",
  "identifier" : "/documentation/professional_video_applications/CompressorExtensionSettings/edit(_:completionHandler:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Professional Video Applications"
    ],
    "preciseIdentifier" : "c:objc(pl)CompressorExtensionSettings(im)editSettings:completionHandler:"
  },
  "title" : "edit(_:completionHandler:)"
}
-->

# edit(_:completionHandler:)

Displays a view that enables users to edit the current encoder settings, and then calls a handler upon completion.

```
func edit(_ viewController: NSViewController!, completionHandler handler: ((NSApplication.ModalResponse) -> Void)!)
```

## Parameters

`viewController`

The Compressor app view controller that hosts the encoder settings view.

`handler`

A block that is called when the extension modal session ends. The block returns no value and takes the following parameter:

- `returnCode`: The return code to send to the completion handler. Choose from one of the return codes defined in the <doc://com.apple.documentation/documentation/AppKit/NSApplication/ModalResponse> enumeration.

## Discussion

The Compressor app typically calls this method when a user tries to configure the encoder settings. The default `ProExtensionPrincipalViewController` object includes a view that you can use to present the current encoder settings in the Compressor app interface. Users can edit these settings from the UI to customize the encoded output. When they finish editing, if the extension calls the completion handler with the `NSModalResponseOK` return code, the Compressor app calls the [`settingsString()`](/documentation/professional_video_applications/CompressorExtensionSettings/settingsString()) method to get the updated settings from the extension. The Compressor app saves the current settings as XML and provides them back to the extension when the extension restarts or during the encoding process.

---

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)