【问题标题】:Show Mail Composer When Cell of Table View Is Selected选择表格视图的单元格时显示邮件编辑器
【发布时间】:2012-09-20 22:31:47
【问题描述】:

我试图让我的表格视图在选择单元格时呈现一个 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:

【问题讨论】:

    标签: iphone xcode uitableview mfmailcomposeviewcontroller


    【解决方案1】:

    您的代码 sn-p 在这里似乎没问题。 如果您为此遗漏了某些内容,请再次执行这些步骤。

    http://www.roseindia.net/answers/viewqa/Mobile-Applications/18176-iPhone-MFMailcomposeviewcontroller-example.html

    希望对你有帮助! 干杯!!

    【讨论】:

      【解决方案2】:

      如果设备配置为发送邮件,最好先检查你可以看到这个 link

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2017-06-30
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2021-08-09
        相关资源
        最近更新 更多