iOS Html Parser: Fetch the url
<p>I have a string which I convert to <code>NSMutableAttributedString</code> using <code>NSUTF8StringEncoding</code>.</p>

<pre><code> NSMutableAttributedString *text = [[NSMutableAttributedString alloc] initWithData:[receivedText dataUsingEncoding:NSUTF8StringEncoding]
                                                                              options:@{
                                                                                        NSDocumentTypeDocumentAttribute: NSHTMLTextDocumentType,
                                                                                        NSCharacterEncodingDocumentAttribute: @(NSUTF8StringEncoding)}
                                                                   documentAttributes:nil error:nil];
</code></pre>

<p>The html parsing works as expected. But my string contains some url links which need to be tappable. After html parsing, my url string will be in blue and underlined, but not tappable. After parsing I get NSLink field, which contains the url. I am not sure how to fetch the url and make it tappable by making it <code>NSLinkAttributeName</code>. Please help me. A part of my string after parsing is:</p>

<pre><code>google.com{
    NSBackgroundColor = "UIDeviceRGBColorSpace 1 1 1 1";
    NSColor = "UIDeviceRGBColorSpace 0.537255 0.537255 0.537255 1";
    NSFont = "&lt;UICTFont: 0x7fdacb166a40&gt; font-family: \".SFUIText-Regular\"; font-weight: normal; font-style: normal; font-size: 15.70pt";
    NSKern = 0;
    NSLink = "http://www.google.com/";
    NSParagraphStyle = "Alignment 3, LineSpacing 0, ParagraphSpacing 0, ParagraphSpacingBefore 0, HeadIndent 0, TailIndent 0, FirstLineHeadIndent 0, LineHeight 0/0, LineHeightMultiple 0, LineBreakMode 0, Tabs (\n    28L,\n    56L,\n    84L,\n    112L,\n    140L,\n    168L,\n    196L,\n    224L,\n    252L,\n    280L,\n    308L,\n    336L\n), DefaultTabInterval 0, Blocks (\n), Lists (\n), BaseWritingDirection -1, HyphenationFactor 0, TighteningForTruncation NO, HeaderLevel 0";
    NSStrokeColor = "UIDeviceRGBColorSpace 0.537255 0.537255 0.537255 1";
    NSStrokeWidth = 0;
    NSUnderline = 1;
}
</code></pre>