mfmailcomposeviewcontroller

How to prevent crash on Cancel of MFMailComposeViewController?

馋奶兔 提交于 2020-01-21 02:26:25
问题 Somewhere: if([MFMailComposeViewController canSendMail]) { MFMailComposeViewController *email_vc = [[MFMailComposeViewController alloc] init]; email_vc.mailComposeDelegate = self; [email_vc setSubject:subject]; [email_vc setMessageBody:message isHTML:FALSE]; [email_vc setToRecipients:recipients]; [self presentModalViewController:email_vc animated:FALSE]; [[UIApplication sharedApplication] setStatusBarHidden:TRUE]; [email_vc release]; } else ... Somewhere else: - (void)mailComposeController:

How to embed an image in the HTML body of an email in iOS

烈酒焚心 提交于 2020-01-13 08:54:09
问题 I'm trying to include an image in the body of an HTML email sent from an iPad. It seems impossible. I have tried to use the CID approach, but it seems that in iOS it is not possible to get/set the CID of attachments. I've also tried to embed the image with src="data:image/png;base64, blahblahblah" . When you compose the mail it seems to work, but nothing appears when the mail is received. Any ideas? More Detail : We are not looking for a solution where the JPEG/PNG is attached at the bottom

MFMailComposeViewController - change cancel and send button to images

ε祈祈猫儿з 提交于 2020-01-12 10:40:53
问题 I want to customize the MFMailComposeViewController such that it has my custom images/buttons instead of the default "cancel" and "send" buttons. I tried googling for an answer but couldn't find anything that could help me. Any help is really appreciated. Thanks in advance.. 回答1: You can't change MFMailComposeViewController. Quoting the documentation: Important: The mail composition interface itself is not customizable and must not be modified by your application. 来源: https://stackoverflow

How can I create an email using a specific font?

时光怂恿深爱的人放手 提交于 2020-01-07 04:53:09
问题 I have made an applications which has specific font (handwriting.ttf), it works absolutely fine in application but when I email the text written in this font through my application - the font becomes gibrish on receivers end (the reason is that receiver does not have this perticular font in his computer) I have seen another application that sends text via email using custom font. This gives me confidence that functionality like this works - but I dont kow how? 回答1: When you say gibberish, do

Found empty data in sqlite when send via MFMailcomposeController

会有一股神秘感。 提交于 2020-01-06 04:34:05
问题 I am sending SQLite(Coredata sqlite file) file via email but found empty data in all tables in the received mail. I am using below code: MFMailComposeViewController *mc = [[MFMailComposeViewController alloc] init]; mc.mailComposeDelegate = self; [mc setSubject:subject]; [mc setMessageBody:body isHTML:FALSE]; if (attachmentData) { [mc addAttachmentData:attachmentData mimeType:fileMimeType fileName:fileName]; } if (!recipients || recipients.count == 0) { recipients = @[]; } [mc setToRecipients

Cannot send email in app using MFMailComposeViewController

删除回忆录丶 提交于 2020-01-04 10:58:10
问题 I have an app which uses MFMailComposeViewController to send documents through email. I read somewhere that I need to enable at least one email so that the method [MFMailComposeViewController canSendEmail] will return YES and email the document. However, whenever I tap the email button, all it does is return to the previous view. I checked the code and [MFMailComposeViewController canSendEmail] returns NO. Can anyone tell me why is this happening? Here is the code: - (void)sendEmail { if (

How do I make the color of UIBarButtonItems for MFMailComposeViewController from the default blue?

女生的网名这么多〃 提交于 2020-01-03 16:58:49
问题 No matter what I seem to try, in the email screen that comes up when a user chooses to email a link (it's a MFMailComposeViewController ) the buttons are always the default blue. I have this in my AppDelegate: [[UINavigationBar appearance] setBarTintColor:[UIColor colorWithRed:0.000 green:156/255.0 blue:51/255.0 alpha:1]]; [[UINavigationBar appearance] setTintColor:[UIColor whiteColor]]; [[UINavigationBar appearance] setTitleTextAttributes:@{ NSForegroundColorAttributeName: [UIColor

MFMailComposeViewController Not Dismissing From View

时光总嘲笑我的痴心妄想 提交于 2020-01-01 16:12:45
问题 I have the following code that is called when a button on an action sheet is called. But when I press cancel, then delete draft, it just feezes and does not dismiss. I use the same code elsewhere in my app and its called from a select of a tableview cell and it works find there. Any ideas why it isn't working here? Ther is also no error msg in the console when it freezes. if([MFMailComposeViewController canSendMail]) { MFMailComposeViewController *picker = [[MFMailComposeViewController alloc]

Preventing MFMailComposeViewController from scaling animated GIFs

北城余情 提交于 2020-01-01 10:12:22
问题 I'm attaching an animated GIF to an email to be sent with MFMailComposeViewController. If the GIF is of sufficient size the MFMailComposeViewController will ask the user whether they want to resize it to a smaller size. Unfortunately, the animation will not be preserved in the resized image. How do I either forbid MFMailComposeViewController to resize the image or make it preserve the animation? 回答1: There’s no built-in API to do this, but one option is to compress the animated GIF into a ZIP

Preventing MFMailComposeViewController from scaling animated GIFs

匆匆过客 提交于 2020-01-01 10:11:56
问题 I'm attaching an animated GIF to an email to be sent with MFMailComposeViewController. If the GIF is of sufficient size the MFMailComposeViewController will ask the user whether they want to resize it to a smaller size. Unfortunately, the animation will not be preserved in the resized image. How do I either forbid MFMailComposeViewController to resize the image or make it preserve the animation? 回答1: There’s no built-in API to do this, but one option is to compress the animated GIF into a ZIP