viewController(for:)
Provides a custom view controller to display as part of the compose window.
Declaration
func viewController(for session: MEComposeSession) -> MEExtensionViewControllerParameters
- session:
The session that represents the properties of the message in the compose window.
Return Value
A custom MEExtensionViewController subclass that Mail displays in the compose window.
Discussion
To configure an icon and tooltip for the compose session handler’s view controller, add the following entries to your extension’s Info.plist file:
<key>NSExtensionAttributes</key>
<dict>
<key>MEComposeSession</key>
<dict>
<key>MEComposeIcon</key>
<string>YourCustomComposeIconName</string>
<key>MEComposeIconToolTip</key>
<string>Tooltip for the compose session handler.</string>
</dict>
<dict>Include an icon in your extension’s bundle using the name you specify for MEComposeIcon.