我试图让我的表格视图在选择单元格时呈现一个 mailcomposerviewcontroller。我试过使用:
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
MFMailComposeViewController *picker = [[MFMailComposeViewController alloc] init];
picker.mailComposeDelegate = self;
// Set up recipients
if ([arryData objectAtIndex:0]) {
[picker setSubject:@"To You"];
NSArray *toRecipients = [NSArray arrayWithObject:@"emailaddress@here.com"];
[picker setToRecipients:toRecipients];
// Fill out the email body text
NSString *emailBody = @"From Me";
[picker setMessageBody:emailBody isHTML:NO];
[self presentModalViewController:picker animated:YES];
[picker release];
}
}
然而,这让我崩溃了
which is waiting for a delayed presention of <MFMailComposeViewController: