在我的 iOS 应用程序中,我允许用户从相册中选择图像或从相机中捕获图像。紧接着,我展示了一个 MFMailComposeViewController,其中包含选择/捕获的图像作为附件。
图像已正确附加和发送,但电子邮件的照片缩略图预览区域在所有情况下都是空白的,除非选择了相册中的最新照片。如果捕获图像或从相册中选择旧图像,则它是空白的,如下所示:
我附加捕获/选定图像的代码是:
MFMailComposeViewController email = new MFMailComposeViewController ();
email.SetToRecipients(new string[] {"test@test.com"});
email.SetSubject("Photo for " + CurrentCompany.DbaName + " (" + CurrentCompany.CoKey.ToString() + ")");
//imageToEmail is a UIImage that is set in the callback from the image capture/selection process
email.AddAttachmentData (imageToEmail.AsPNG(), "image/png", "photo.png");
email.Finished += HandleFinished;
NavigationController.PresentViewController(email, true, null);
为什么预览是空白的?