Мой вопрос прост, я пытаюсь отправить изображение по электронной почте, но добавить подпись.Как вставить подпись в UIimage для экспорта по электронной почте
Вот что я использую для изображения -
NSData *imageDatatwo = UIImagePNGRepresentation(self.personimgThumbNailtwo.image);
[mailer addAttachmentData:imageDatatwo mimeType:@"image/png" fileName:@"Imagetwo"];
- (IBAction)openMail:(id)sender
{
if ([MFMailComposeViewController canSendMail])
{
MFMailComposeViewController *mailer = [[MFMailComposeViewController alloc] init];
mailer.mailComposeDelegate = self;
NSData *imageDatatwo = UIImagePNGRepresentation(self.personimgThumbNailtwo.image);
[mailer addAttachmentData:imageDatatwo mimeType:@"image/png" fileName:@"Imagetwo"];
[self presentModalViewController:mailer animated:YES];
} }
- (void)mailComposeControllerthree:(MFMailComposeViewController*)controller didFinishWithResult:(MFMailComposeResult)result error:(NSError*)error
{
switch (result)
{
case MFMailComposeResultCancelled:
NSLog(@"Mail cancelled: you cancelled the operation and no email message was queued.");
break;
case MFMailComposeResultSaved:
NSLog(@"Mail saved: you saved the email message in the drafts folder.");
break;
case MFMailComposeResultSent:
NSLog(@"Mail send: the email message is queued in the outbox. It is ready to send.");
break;
case MFMailComposeResultFailed:
NSLog(@"Mail failed: the email message was not saved or queued, possibly due to an error.");
break;
default:
NSLog(@"Mail not sent.");
break;
}
// Remove the mail view
[self dismissModalViewControllerAnimated:YES];
}
вы хотите поместить текст в теле сообщения электронной почты вместе с изображением или композитным текстом на изображение, прежде чем прикрепить его? – axiixc