In my program modify an image at run time and I have to send it by e-mail. Not required to keep in the device. Any suggestions?
I use this but not works because the image is not saved in mi iphone =(
- (void)emailImage{
MFMailComposeViewController *picker = [[MFMailComposeViewController alloc] init];
picker.mailComposeDelegate = self;
// Set the subject of email
[picker setSubject:@"MI FOTO FINAL"];
// Fill out the email body text
NSString *emailBody = @"Foto final";
// This is not an HTML formatted email
[picker setMessageBody:emailBody isHTML:NO];
NSData *data = UIImagePNGRepresentation(Foto.image);
[picker addAttachmentData:data mimeType:@"image/png" fileName:@"ImagenFinal"];
// [picker addAttachmentData:data mimeType:nil fileName:nil];
// Show email view
[self presentModalViewController:picker animated:YES];
}