Created
April 20, 2010 09:34
-
-
Save 0xced/372236 to your computer and use it in GitHub Desktop.
Automatically show keyboard in MFMailComposeViewController
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@try | |
{ | |
id textView = [mailComposeViewController valueForKeyPath:@"internal.mailComposeView.textView"]; | |
if ([textView respondsToSelector:@selector(becomeFirstResponder)]) | |
[textView becomeFirstResponder]; | |
} | |
@catch (NSException *e) {} |
But does it automatically show the keyboard, without the user tapping the text view?
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
Cocoanetics says: Just resignFirstResponder on the element that has it before presenting the mail VC