Clickable link (Hyperlink)?

2019-08-26 02:06发布

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!

标签: ios hyperlink
1条回答
爷的心禁止访问
2楼-- · 2019-08-26 02:15

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;
查看更多
登录 后发表回答