0

コーディングにエラーがあるようで、nil が多すぎるか、何か助けが必要だと表示されます

MFMailComposeViewController *composer = [[MFMailComposeViewController alloc]init];
if ([MFMailComposeViewController canSendMail]) {

    [composer setToRecipients:[NSArray arrayWithObject:@"nicole@aandtlegal.com", nil]];
    [composer setSubject:nil];[composer setMailComposeDelegate:self];
    [composer setMessageBody:nil isHTML:YES];
    [composer setModalTransitionStyle:UIModalTransitionStyleFlipHorizontal];
4

1 に答える 1

0

このコードを試してください:

MFMailComposeViewController *picker = [[MFMailComposeViewController alloc] init];
picker.mailComposeDelegate = self;
[picker setSubject:@"Hello!"];
NSArray *toRecipients = [NSArray arrayWithObject:@"example@example.com"]; 
[picker setToRecipients:toRecipients];
NSString *emailBody = [NSString stringWithString:@"Hello!"];
[picker setMessageBody:emailBody isHTML:YES];
picker.navigationBar.barStyle = UIBarStyleBlack;
[self presentModalViewController:picker animated:YES];
[picker release];
于 2012-07-01T03:07:29.377 に答える