Set default subject when click on email address

前端 未结 2 788
遥遥无期
遥遥无期 2021-01-27 16:19

I am using dataDetectorTypes property with UITextView.code works fine.

When I click on link email composer appears with pre-filled To:[email address] but i want to set d

2条回答
  •  孤街浪徒
    2021-01-27 16:45

        MFMailComposeViewController *mailController =    [[MFMailComposeViewController alloc] init]; 
    
       mailController.mailComposeDelegate = self;
    
    if([MFMailComposeViewController canSendMail]){
        [mailController setSubject:@"Subject"];
        [mailController setMessageBody:@"Email body here" isHTML:NO]; 
        [mailController setMessageBody:[self getInFo] isHTML:YES]; 
        [mailController setToRecipients:[NSArray arrayWithObject:@"xx@xxx.com"]];
        [mailController setTitle:@"Title"];
    
        [self presentModalViewController:mailController animated:YES]; 
    }else{
        [mailController release];
    }
    

提交回复
热议问题