0

I have a mailcomposer in which i have attached a file through coding(hard-coded)..

I need to have a button so that When i press the button.It should ask which file to attach...

My code is shown below in which i am attaching the file hordcoded...

UIImage *img=[UIImage imageNamed:@"Mehmood.jpg"];
NSData *imgData=UIImageJPEGRepresentation(img, 1);
[composer addAttachmentData:imgData mimeType:@"image/jpeg" fileName:@"Mehmood.jpg"]; 

Even I need to attach any file which i am selecting after button click(not the specific one like png/jpeg)...

Please help... Thanks in advance

4

2 回答 2

0

您无法真正修改标准邮件编辑器窗口来添加您自己的按钮。在展示邮件编辑器之前,您应该询问用户他们想要附加什么。

于 2012-04-04T13:33:57.410 回答
0

也许这会对你有所帮助。

iPhone MIME 类型数据库在哪里?

于 2012-04-04T10:07:33.310 回答