---
title: MFMailComposeViewControllerDelegate
framework: Message UI
role: symbol
role_heading: Protocol
platforms: [iOS 3.0+, iPadOS 3.0+, Mac Catalyst 13.0+, visionOS 1.0+]
path: messageui/mfmailcomposeviewcontrollerdelegate
---

# MFMailComposeViewControllerDelegate

An interface for responding to user interactions with a mail compose view controller.

## Declaration

```swift
protocol MFMailComposeViewControllerDelegate : NSObjectProtocol
```

## Overview

Overview The MFMailComposeViewControllerDelegate protocol defines the method that your delegate must implement to manage the mail composition interface. The method of this protocol notifies your delegate object when the user has finished with the interface and is ready to dismiss it. Your delegate object is responsible for dismissing the picker when the operation completes. You do this by using the dismiss(animated:completion:) method of the parent view controller, which is responsible for displaying the MFMailComposeViewController object’s interface.

## Topics

### Responding to Email Completion

- [mailComposeController(_:didFinishWith:error:)](messageui/mfmailcomposeviewcontrollerdelegate/mailcomposecontroller(_:didfinishwith:error:).md)
- [MFMailComposeResult](messageui/mfmailcomposeresult.md)

## Relationships

### Inherits From

- [NSObjectProtocol](objectivec/nsobjectprotocol.md)

## See Also

### Responding to the view controller dismissal

- [mailComposeDelegate](messageui/mfmailcomposeviewcontroller/mailcomposedelegate.md)
