mfmailcomposeviewcontroller

MFMailComposeViewController Keyboard Issue

拟墨画扇 提交于 2019-11-30 03:12:50
问题 How do i dismiss the keyboard without pressing the Send or Cancel button in MFMailComposeViewController?! Thanks for any help. 回答1: Can you try this. UIWindow* keyWindow = [[UIApplication sharedApplication] keyWindow]; UIView* firstResponder = [keyWindow performSelector:@selector(firstResponder)]; [firstResponder resignFirstResponder]; hope this helps.... 回答2: I experienced a similar problem: For some reason iOS does not dismiss the Keyboard of a MFMailComposeViewController when the

Issue when using MFMailComposeViewController

牧云@^-^@ 提交于 2019-11-30 02:58:40
I have a tricky problem. In one of my app, with over 150.000 downloads... I have a problem which seldom occurs and which I can't seem to figure out. The problem is the following: In a view where the user can share a list via email, I open the mail window using MFMailComposeViewController . However, in some few cases the app seems to get a problem using the mail composer. The user presses the share button, the mail windows slides up, waits about 1-2 sec and then closes again. No content in the mail window, although I do send data to it. I myself have not been able to re-create the problem on

Change title color of navigation bar in MFMailComposeViewController in iOS 12 not working

情到浓时终转凉″ 提交于 2019-11-30 01:28:18
How can I change the title color of UINavigationBar in MFMailComposeViewController in iOS 12 ? This is what I am doing: import MessageUI extension MFMailComposeViewController { open override func viewDidLoad() { super.viewDidLoad() navigationBar.isTranslucent = false navigationBar.isOpaque = false navigationBar.barTintColor = .white navigationBar.tintColor = .white navigationBar.titleTextAttributes = [NSAttributedStringKey.foregroundColor: UIColor.white] } } In iOS 10 works: In iOS 11 works: In iOS 12 is not working: I tried all the way to change the title color, however it doesn't work Before

iOS6: MFMailComposeViewController slow to load and flashes black screen; MailCompositionS begins hogging memory

醉酒当歌 提交于 2019-11-29 16:54:04
问题 On iOS 6, after sending a few email messages (by using MFMailComposeViewController), the email screens become very slow to open- at first opening with none of the fields populated (no Subject, no body, etc.) for a few seconds, and eventually (after sending about 8 messages), a black screen is displayed to the user for a few seconds before the email view controller is properly displayed. The log spits out the following line before each black screen is displayed:

MFMessageComposeViewController alloc returns nil

拥有回忆 提交于 2019-11-29 16:43:54
问题 In my application, MFMailComposeViewController works fine but creating a new instance of MFMessageComposeViewController fails. Here is the code for both: -( IBAction)sendSMS: (id)sender { MFMessageComposeViewController *picker = [[[MFMessageComposeViewController alloc] init] autorelease]; picker.messageComposeDelegate = self; NSArray *toRecipients = [NSArray arrayWithObject: cell.currentTitle ]; picker.recipients = toRecipients; [self presentModalViewController:picker animated:YES]; } -(

Attaching an image to an email?

末鹿安然 提交于 2019-11-29 12:30:54
I want to to use MFMailComposeViewController to send an email, and I already have that set up, but I'm having trouble actually attaching an image, which is a screenshot, into the email. Here's the line of code. [composer addAttachmentData:image mimeType:image/png //png undeclared//fileName:@"GameOver Screenshot.png"]; //Incompatible Obj-C types 'struct UIImage *' expected 'struct NSData *' when passing argument 1 of .....// image is the name of my UIImage screenshot. I'm not sure what to replace it with. Thanks in advance for the help/assistance. The first parameter to addAttachmentData is an

NSMutableArray Data Attachement With E-mail Body?

会有一股神秘感。 提交于 2019-11-29 08:58:47
My NSMutableArray data are in NSData formate.I am trying to attached NSMutableArray data to E-mail body.Here is my NSMutableArray code: NSUserDefaults *defaults1 = [NSUserDefaults standardUserDefaults]; NSString *msg1 = [defaults1 objectForKey:@"key5"]; NSData *colorData = [defaults1 objectForKey:@"key6"]; UIColor *color = [NSKeyedUnarchiver unarchiveObjectWithData:colorData]; NSData *colorData1 = [defaults1 objectForKey:@"key7"]; UIColor *color1 = [NSKeyedUnarchiver unarchiveObjectWithData:colorData1]; NSData *colorData2 = [defaults1 objectForKey:@"key8"]; UIFont *color2 = [NSKeyedUnarchiver

Set First Responder in MFMailComposeViewController?

烈酒焚心 提交于 2019-11-29 07:14:32
I'm using Apple's MailComposer example application to send email from within my application (OS 3.0 functionality). Is it possible to set the To, Subject, or Body fields as first responder with MFMailComposeViewController? In other words, the behavior would be: the user presses a button which presents the mail view (presentModalViewController). When the mail view is presented, the cursor is placed in one of the fields and the keyboard opens. I notice the MFMailComposeViewController documentation says: "Important: The mail composition interface itself is not customizable and must not be

MFMailComposeViewController in Swift does not dismiss

时光总嘲笑我的痴心妄想 提交于 2019-11-29 06:38:13
This is sample code: import UIKit import MessageUI class ViewController: UIViewController, MFMailComposeViewControllerDelegate { @IBAction func showEmail(sender : AnyObject) { var emailTitle = "Test Email" var messageBody = "This is a test email body" var toRecipents = ["a.nakhimov@gmail.com"] var mc: MFMailComposeViewController = MFMailComposeViewController() mc.mailComposeDelegate = self mc.setSubject(emailTitle) mc.setMessageBody(messageBody, isHTML: false) mc.setToRecipients(toRecipents) self.presentViewController(mc, animated: true, completion: nil) } override func viewDidLoad() { super

Issue when using MFMailComposeViewController

百般思念 提交于 2019-11-29 00:33:41
问题 I have a tricky problem. In one of my app, with over 150.000 downloads... I have a problem which seldom occurs and which I can't seem to figure out. The problem is the following: In a view where the user can share a list via email, I open the mail window using MFMailComposeViewController . However, in some few cases the app seems to get a problem using the mail composer. The user presses the share button, the mail windows slides up, waits about 1-2 sec and then closes again. No content in the