Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Set "To:" field as first responder in MFMailComposeViewController

Does anyone have any ideas on the right way to do this? There is one answer to a similar question on here, but it's so convoluted, I can't imagine it being right. There has to be an easier way to just show the keyboard when this modal view pops up. right?

like image 704
mitchkramez Avatar asked Nov 09 '10 03:11

mitchkramez


1 Answers

MFMailComposeViewController *picker = [[MFMailComposeViewController alloc] init];
picker.mailComposeDelegate = self;

[picker setSubject:@"Mail subject"];
[picker setToRecipients:[NSArray arrayWithObjects:@"[email protected]",nil]];
like image 98
John Smith Avatar answered Sep 21 '22 08:09

John Smith