ios의 Mfmailcomposer보기 컨트롤러에 웹보기 데이터와 이미지보기 데이터를 추가하는 방법. 다른 사용자에게 메일을 보내려는 경우 두 이미지를 mfmailcomposer보기 컨트롤러에 연결하는 방법
0
A
답변
0
당신은
for (UIImage *yourImage in YourImageArray)
{
NSData *imgData = UIImageJPEGRepresentation(yourImage, 0.5);
[mfMailComposer addAttachmentData:imgData mimeType:@"image/jpeg" fileName:[NSString
stringWithFormat:@"a.jpg"]];
}
0
최적의 솔루션입니다 사용할 수있는 MSG가 값이
[mailCompose setMessageBody: msg isHTML: YES];
:
<body>
<img src='http://your_site/image1.jpg'>
<img src='http://your_site/image2.jpg'>
<br/>
<font face='Arial' size='2'>
Message Text<br/>
<br/>
</font>
0
당신은 당신의 메일에 하나 개 이상의 이미지를 추가 할 수 있습니다 작곡가 인턴. 하지만 파일 이름이 다른지 확인하십시오. 여기에서 확인하십시오 : http://developer.apple.com/library/ios/#documentation/MessageUI/Reference/MFMailComposeViewController_class/Reference/Reference.html#//apple_ref/doc/uid/TP40008200-CH1-SW2.
2
당신이 이메일로 attech 원하는 무엇 imageFull 경로 배열을 생성 Firest하고 울부 짖는 소리처럼 수행 할 수 있습니다 -
- (IBAction)sendemail
{
Class mailClass = (NSClassFromString(@"MFMailComposeViewController"));
if (mailClass != nil)
{
// We must always check whether the current device is configured for sending emails
if ([mailClass canSendMail])
{
MFMailComposeViewController *picker = [[MFMailComposeViewController alloc] init];
picker.mailComposeDelegate = self;
[picker setSubject:@"Hello"];
//NSString *result = txtFiled.text;
for(NSString *dicsss in buttonss) // Hear buttonss its a ImagePathfull array
{
UIImage *imgvith = [UIImage imageWithContentsOfFile:[buttonss stringByAppendingPathComponent:dicsss]];
NSData *data = UIImagePNGRepresentation(imgvith);
[picker addAttachmentData:data mimeType:@"image/png" fileName:@"yourImagename"];
}
NSString *emailBody = @"Hi";
[picker setMessageBody:emailBody isHTML:YES];
[self presentModalViewController:picker animated:YES];
[picker release];
}
}
작업 코드 스크린 샷은 볼과 같은 : -