我正在尝试让我的表视图在选择单元格时显示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:
答案 0 :(得分:0)
如果设备配置为发送邮件,最好先检查。 您可以看到 link
答案 1 :(得分:0)
您的代码段在这里似乎没问题。 如果你遗漏了一些事情,仍然会再次执行这些步骤。
我希望它可以帮到你! 干杯!!