I get a similar HTML from the server:
"<br>Dummy text<br>Click <a href="www.google.com">Here</a>"
No Click Here should be possible to click and open in Safari. I tried to implement the following code: (being textMsg a TextView).
NSAttributedString * attrStr = [[NSAttributedString alloc] initWithData:[[self.myServer textHTML] dataUsingEncoding:NSUnicodeStringEncoding] options:@{ NSDocumentTypeDocumentAttribute: NSHTMLTextDocumentType } documentAttributes:nil error:nil];
[self.textMsg setEditable:NO];
[self.textMsg setScrollEnabled:NO];
[self.textMsg setDataDetectorTypes:UIDataDetectorTypeLink];
self.textMsg.attributedText = attrStr ;
I also tried other similar ways, but none worked.
In android there is a similar function, Html.fromHtml ().
Receiving the link in this way, is there a way to get it redirected to the browser?