2012-09-20 93 views
0

我試圖讓我的表格視圖在選擇單元格時顯示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:@"[email protected]"]; 
    [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

這是更好地檢查第一,如果設備被配置爲發送的郵件。 你可以看到這link

相關問題