2011-05-21 66 views

回答

1

image任何示例應用程序的源代碼是你要附加的圖像。

NSData *attachmentData = UIImageJPEGRepresentation(image, 1.0); 

... 

MFMailComposeViewController *mailComposer = [[MFMailComposeViewController alloc] init]; 
... 
[mailComposer addAttachmentData:attachmentData mimeType:@"image/jpeg" fileName:@"attachment.jpeg"]; 
... 
// Push it on to the screen. 
+0

但是,我想選擇從保存的相冊的圖像,然後附加到郵件,,, dynamially meanz ... – nips 2011-05-21 03:37:59

+0

我假設你知道如何得到這些照片。您將不得不使用「UIImagePickerController」實例來獲取照片。 – 2011-05-21 03:47:45

+0

ohhh ,, ok thankz deepak,但如果我從mfmailcomposer郵件我didint得到的郵件,, – nips 2011-05-21 03:51:36