TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | MIT |
ReleasedLast Release | Oct 2015 |
Easy to send e-mail by MFMailComposeViewController
.
You don't worry about MFMailComposeViewControllerDelegate
, can write with block.
pod 'EasyMailSender'
MFMailComposeViewController
showFromViewController:
- (IBAction)handleMailButton:(id) sender {
NSString *attachedText = @"text";
EasyMailAlertSender *mailSender = [EasyMailAlertSender easyMail:^(MFMailComposeViewController *controller) {
// Setup
[controller addAttachmentData:[attachedText dataUsingEncoding:NSUTF8StringEncoding] mimeType:@"plain/text" fileName:@"test.txt"];
} complete:^(MFMailComposeViewController *controller, MFMailComposeResult result, NSError *error) {
// When Sent/Cancel - MFMailComposeViewControllerDelegate action
[controller dismissViewControllerAnimated:YES completion:nil];
}];
[mailSender showFromViewController:self];
}
git checkout -b my-new-feature
git commit -am 'Add some feature'
git push origin my-new-feature
MIT