I've configured a simple MFMailComposeViewController below. If I populate the setToRecipients, everything works fine, the email is sent. If I do not populate the setToRecipients, the mail composer window pops up but all fields remain non-editable.
I thought the MFMailComposeViewController would allow the user to edit the email before sending? Is this possible using the standard controls?
- (IBAction) sendEmail
{
    MFMailComposeViewController *picker = [[MFMailComposeViewController alloc] init];
    picker.mailComposeDelegate = self;
    [picker setSubject:[NSString stringWithFormat:@"Receipt Email - %@",[self.labelDate开发者_运维技巧 text]]];
    NSString *emailBody = @"This is the message body";
    [picker setMessageBody:emailBody isHTML:NO];
    [self presentModalViewController:picker animated:YES];
    [picker release];   
}
Never mind guys.... I hadn't resigned first responder of the parent view >.< Resolved by adding [self.parentViewController resignFirstResponder]; [self becomeFirstResponder];
                                        
                                        
                                        
                                        
                                        
                                        
                                        
                                        
 加载中,请稍侯......
      
精彩评论