---
title: "edit(_:completionHandler:)"
framework: Professional Video Applications
role: symbol
role_heading: Instance Method
platforms: [provideo encoder extensions 1.0+]
path: "professional_video_applications/compressorextensionsettings/edit(_:completionhandler:)"
---

# edit(_:completionHandler:)

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

## Declaration

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

```swift
func edit(_ viewController: NSViewController!) async -> NSApplication.ModalResponse
```

## 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:

## Discussion

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() 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.
