如何將web視圖數據和圖像視圖數據添加到ios中的Mfmailcomposer視圖控制器。 發送郵件給他人。如何將兩個圖像附加到ios中的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
最好的辦法是
[mailCompose setMessageBody: msg isHTML: YES];
其中msg具有價值:
<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
您可以在郵件中添加多個圖片作曲家instanse。但確保文件名是不同的。在這裏檢查:http://developer.apple.com/library/ios/#documentation/MessageUI/Reference/MFMailComposeViewController_class/Reference/Reference.html#//apple_ref/doc/uid/TP40008200-CH1-SW2。
2
可以Firest創建要與電子郵件attech什麼imageFull通道陣列和不喜歡波紋管: -
- (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];
}
}
工作的代碼截圖如下所示: -
相關問題
- 1. iOS - 將子視圖添加到子視圖控制器視圖
- 2. iPhone如何將視圖控制器的視圖添加到另一個視圖控制器的視圖?
- 3. 如何將現有視圖附加到控制器操作?
- 4. IOS - 將子控制器/視圖加載到視圖
- 5. 如何在將圖像加載到視圖控制器之前裁剪圖像
- 6. iOS 4.3:難以將圖形附加到圖像視圖
- 7. 如何將子視圖添加到其他視圖控制器?
- 8. 如何將子視圖添加到視圖控制器?
- 9. 如何在一個視圖控制器中將xib加載到兩個容器視圖中
- 10. 將多個視圖(&nibs)添加到單個視圖控制器
- 11. 發送圖像到另一個視圖控制器UIImageView IOS 5.1
- 12. 以模態方式呈現視圖控制器,就像MFMailComposer
- 13. 將手勢識別器附加到多個圖像視圖
- 14. 如何創建一個視圖添加到視圖控制器?
- 15. iOS的增加有兩個視圖控制器
- 16. 將視圖添加到分割視圖中的根控制器
- 17. 如何使模板附加到從控制器specefic視圖
- 18. 如何使用Storyboard將兩個視圖控制器連接到一個視圖控制器?
- 19. 如何將圖像添加到ios objective c中的uiactivityindicator視圖?
- 20. 頁面視圖控制器 - 從圖像到另一個視圖控制器
- 21. 如何從一個視圖控制器導航到Xamarin ios中的第二個視圖控制器?
- 22. 將UIPageViewController添加到視圖控制器的容器視圖
- 23. 將數據從一個視圖控制器傳遞到另一個視圖控制器; iOS <= 4 vs iOS 5
- 24. 如何在UIPageViewcontroller中添加兩個視圖控制器
- 25. 如何使父視圖控制器管理兩個子視圖控制器
- 26. 導航視圖控制器中的IOS圖像選取器
- 27. Swift:將實例變量附加到視圖控制器
- 28. iOS的「視圖控制器」
- 29. 如何用附加的視圖控制器加載xib文件?
- 30. 如何發送圖像到另一個視圖控制器