logo

How to attach images to email using MFMailComposeViewController

MFMailComposeViewController *picker = [[MFMailComposeViewController alloc] init];
[picker addAttachmentData:UIImagePNGRepresentation(_imageView.image) mimeType:@"image/png" fileName:[NSString stringWithFormat:@"%@ %@.png",_comicItem.comicName,_comicItem.entryTitle]];

You can change this to JPEG, PNG, GIF, etc.

Here’s a sample video as well, not that short, but it’s a simple tutorial:

iPhone Programming: In-App Email – How to attach files

Leave a Reply

*

captcha *