pub unsafe trait MFMailComposeViewControllerDelegate: NSObjectProtocol {
// Provided method
unsafe fn mailComposeController_didFinishWithResult_error(
&self,
controller: &MFMailComposeViewController,
result: MFMailComposeResult,
error: Option<&NSError>,
)
where Self: Sized + Message { ... }
}
MFMailComposeViewController
only.Expand description
Protocol for delegate callbacks to MFMailComposeViewController instances.
This protocol must be implemented for delegates of MFMailComposeViewController instances. It will be called at various times while the user is composing, sending, saving, or canceling email composition.
See also Apple’s documentation
Provided Methods§
Sourceunsafe fn mailComposeController_didFinishWithResult_error(
&self,
controller: &MFMailComposeViewController,
result: MFMailComposeResult,
error: Option<&NSError>,
)
Available on crate feature objc2-ui-kit
only.
unsafe fn mailComposeController_didFinishWithResult_error( &self, controller: &MFMailComposeViewController, result: MFMailComposeResult, error: Option<&NSError>, )
objc2-ui-kit
only.Delegate callback which is called upon user’s completion of email composition.
This delegate callback will be called when the user completes the email composition. How the user chose to complete this task will be given as one of the parameters to the callback. Upon this call, the client should remove the view associated with the controller, typically by dismissing modally.
Parameter controller
: The MFMailComposeViewController instance which is returning the result.
Parameter result
: MFMailComposeResult indicating how the user chose to complete the composition process.
Parameter error
: NSError indicating the failure reason if failure did occur. This will be
nil
if
result did not indicate failure.