IOS MFMailComposeViewController链接一个href没有点击

时间:2014-12-16 05:45:26

标签: ios href mfmailcomposeviewcontroller

我有一个问题。

我的链接是HTML,我可以看到'蓝色'但是如果我点击它,就不会打开safari mobile。允许我编辑文本。

在课堂上我有这个:

if ([MFMailComposeViewController canSendMail]) {
            self.mailComposeDelegate = self;
            [self setSubject: @"Subject"];
            [self setMessageBody: @"<h2>Body</h2><a href='http://www.google.com'>link example</a>" isHTML: YES];
        }

enter image description here

1 个答案:

答案 0 :(得分:0)

试试这个:

<a href=\"http://www.google.com">link example</a>

<强>编辑:

试试这个有效的代码:

messageBody = [NSString stringWithFormat:@"<a href:\"\nhttps://www.google.com\">\nhttps://www.google.com</a>"];
相关问题