Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You are able to make these fields become the first responder.</p> <p>if you add the following method to your class...</p> <pre><code>//Returns true if the ToAddress field was found any of the sub views and made first responder //passing in @"MFComposeSubjectView" as the value for field makes the subject become first responder //passing in @"MFComposeTextContentView" as the value for field makes the body become first responder //passing in @"RecipientTextField" as the value for field makes the to address field become first responder - (BOOL) setMFMailFieldAsFirstResponder:(UIView*)view mfMailField:(NSString*)field{ for (UIView *subview in view.subviews) { NSString *className = [NSString stringWithFormat:@"%@", [subview class]]; if ([className isEqualToString:field]) { //Found the sub view we need to set as first responder [subview becomeFirstResponder]; return YES; } if ([subview.subviews count] &gt; 0) { if ([self setMFMailFieldAsFirstResponder:subview mfMailField:field]){ //Field was found and made first responder in a subview return YES; } } } //field not found in this view. return NO; } </code></pre> <p>Then, after you present the MFMailComposeViewController, pass the MFMailComposeViewController's view into the function along with the field you want to become first responder.</p> <pre><code>MFMailComposeViewController *mailComposer = [[MFMailComposeViewController alloc] init]; mailComposer.mailComposeDelegate = self; /*Set up the mail composer*/ [self presentModalViewController:mailComposer animated:YES]; [self setMFMailFieldAsFirstResponder:mailComposer.view mfMailField:@"RecipientTextField"]; [mailComposer release]; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload