<!--
{
  "availability" : [
    "iOS: 3.0.0 -",
    "iPadOS: 3.0.0 -",
    "macCatalyst: 13.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "MessageUI",
  "identifier" : "/documentation/MessageUI/MFMessageComposeViewControllerDelegate",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "Message UI"
    ],
    "preciseIdentifier" : "c:objc(pl)MFMessageComposeViewControllerDelegate"
  },
  "title" : "MFMessageComposeViewControllerDelegate"
}
-->

# MFMessageComposeViewControllerDelegate

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

```
protocol MFMessageComposeViewControllerDelegate : NSObjectProtocol
```

## Overview

The [`MFMessageComposeViewControllerDelegate`](/documentation/MessageUI/MFMessageComposeViewControllerDelegate) protocol defines a single method that custom objects can implement to respond to updates from a message composition view (an instance of the  [`MFMessageComposeViewController`](/documentation/MessageUI/MFMessageComposeViewController) class). Use the method of this protocol to respond to the end of the user composing an SMS message. The method includes information about whether the user chose to send or cancel the message, or whether the attempt to send it failed.

## Topics

### Responding to the Message Completion

[`-  messageComposeViewController:didFinishWithResult:`](/documentation/MessageUI/MFMessageComposeViewControllerDelegate/messageComposeViewController(_:didFinishWith:))

Tells the delegate that the user finished composing the message.

[`MessageComposeResult`](/documentation/MessageUI/MessageComposeResult)

These constants describe the result of the message-composition interface.

## Relationships

### Inherits From

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

---

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)