【问题标题】:Hyperlink in email body does not working in iphone电子邮件正文中的超链接在 iphone 中不起作用
【发布时间】:2023-03-03 07:12:19
【问题描述】:

我使用以下代码在电子邮件正文中显示超链接。但它只在邮件正文中显示文本。当我点击它时。没有任何反应。

-(IBAction)emailToFriend:(id)sender
{
    NSLog(@"E-Mail...");
    MFMailComposeViewController *controller = [[MFMailComposeViewController alloc] init];
    controller.mailComposeDelegate = self;

    [controller setSubject:@"My Subject"];



    [controller setMessageBody:@"<a href=\"http://www.google.com\">http://www.google.com</a>" isHTML:YES]; 

    [self presentModalViewController:controller animated:YES];
    [controller release];

}

谁能告诉我这里出了什么问题?我检查了问题MFMailComposeViewController : how do I embed a clickable URL link into the email message body它没有帮助我

【问题讨论】:

  • 我认为 textView 在可编辑模式下禁用链接检查器。你检查收到的邮件是否没有链接?
  • 是的,收到的邮件包含链接。谢谢

标签: iphone html email html-email mfmailcomposeviewcontroller


【解决方案1】:

在发送链接之前,它是不可点击的。这只是纯文本。但是,在发送电子邮件后,收件人将能够点击链接(电子邮件程序使其可点击)。

【讨论】:

    猜你喜欢
    • 2011-12-09
    • 1970-01-01
    • 1970-01-01
    • 2013-07-12
    • 2018-03-25
    • 1970-01-01
    • 1970-01-01
    • 2015-03-12
    • 2015-04-05
    相关资源
    最近更新 更多