本文介绍了在iPhone中的邮件中附加多个图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想要以邮寄方式附加多张图片。有没有办法将照片附加为zip并将其附加到邮件中。



是否有另一种方式在iPhone中发送文本和图像作为支持Excel的文件。 p>

请帮助我。谢谢。

解决方案

你需要调用 -addAttachmentData:mimeType:fileName:多次。



我使用下面的代码来附加多个图像: / p>

  mailViewController = [[MFMailComposeViewController alloc] init]; 
mailViewController.mailComposeDelegate = self;
[mailViewController setSubject:yourSubject];
[mailViewController setMessageBody:yourBodyMsg isHTML:NO];
[mailViewController addAttachmentData:emailAttachment1 mimeType:@image / jpegfileName:@abc.jpg];
[mailViewController addAttachmentData:emailAttachment2 mimeType:@image / jpegfileName:@xyz.jpg];


I want attach multiple images in mail programatically. Is there any way possible to attach the photos as zip and attach it to mail.

Is there another way to send text and images as excel supported file in iPhone.

Please help me out.Thanks.

解决方案

You need to call -addAttachmentData:mimeType:fileName: multiple times.

I've used below code to attach multiple images :-

mailViewController = [[MFMailComposeViewController alloc] init];
mailViewController.mailComposeDelegate = self;
[mailViewController setSubject:yourSubject];
[mailViewController setMessageBody:yourBodyMsg isHTML:NO];
[mailViewController addAttachmentData:emailAttachment1 mimeType:@"image/jpeg" fileName:@"abc.jpg"];
[mailViewController addAttachmentData:emailAttachment2 mimeType:@"image/jpeg" fileName:@"xyz.jpg"];

这篇关于在iPhone中的邮件中附加多个图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-16 14:44