mitchkramez
mitchkramez

Reputation: 76

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?

Upvotes: 6

Views: 3462

Answers (1)

John Smith
John Smith

Reputation: 12807

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

[picker setSubject:@"Mail subject"];
[picker setToRecipients:[NSArray arrayWithObjects:@"[email protected]",nil]];

Upvotes: 7

Related Questions