可点击链接(超链接)? [英] Clickable link (Hyperlink)?

查看:170
本文介绍了可点击链接(超链接)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果这是一个愚蠢的问题,我很抱歉,但我找不到答案。有没有办法在 MFMailComposeController 或任何其他 NSString 中创建可点击链接?我只是希望它是蓝色的,用户可以点击它,它将转到该链接。



谢谢!


<邮件msg正文中的div class =h2_lin>解决方案

试试这个 - [mailComposer setMessageBody:msg isHTML:YES]; 。因此,当您将消息组成HTML&设置此设置,以便邮件以HTML格式发送...

  MFMailComposeViewController * mailComposer; 
mailComposer = [[MFMailComposeViewController alloc] init];
mailComposer.mailComposeDelegate = self;
[mailComposer setModalPresentationStyle:UIModalPresentationFormSheet];
[mailComposer setSubject:@Mail subject];
[mailComposer setMessageBody:msg isHTML:YES];
[self presentModalViewController:mailComposer animated:YES];
[mailComposer release];
返回;


I'm sorry if this is a stupid question but I cannot find a answer. Is there a way to create a clickable link say in a MFMailComposeController or in any other NSString? I just want it to be blue and the user will be able to click it and it will go to that link.

Thanks!

解决方案

in the mail msg body try this - [mailComposer setMessageBody:msg isHTML:YES];. So when you put the message compose it of HTML & put this setting so that the mail is sent as HTML...

MFMailComposeViewController *mailComposer; 
mailComposer  = [[MFMailComposeViewController alloc] init];
mailComposer.mailComposeDelegate = self;
[mailComposer setModalPresentationStyle:UIModalPresentationFormSheet];
[mailComposer setSubject:@"Mail subject"];
[mailComposer setMessageBody:msg isHTML:YES];
[self presentModalViewController:mailComposer animated:YES];
[mailComposer release];
return;

这篇关于可点击链接(超链接)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆