Skip to content

Instantly share code, notes, and snippets.

@0xced
Created April 20, 2010 09:34
Show Gist options
  • Save 0xced/372236 to your computer and use it in GitHub Desktop.
Save 0xced/372236 to your computer and use it in GitHub Desktop.
Automatically show keyboard in MFMailComposeViewController
@try
{
id textView = [mailComposeViewController valueForKeyPath:@"internal.mailComposeView.textView"];
if ([textView respondsToSelector:@selector(becomeFirstResponder)])
[textView becomeFirstResponder];
}
@catch (NSException *e) {}
@haikusw
Copy link

haikusw commented Jul 26, 2011

it should. Setting a UITextField to the first responder does, so I don't see why this wouldn't. I haven't tried this particular case. Obviously it's also getting into undocumented internal stuff, so iffy for those reasons.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment