I'm inserting some data to my Label
in xcode.
It contains html < a href="">
tags. I would like to make this link clickable.
I tried to use UITextView
and in storyboard set Link
check to detect links. But in my case I have the link inside my text.
So I'm unable to do something like this:
attributedString.addAttribute(.link,
value: "https://www.google.co.jp/",
range: NSString(string: baseString).range(of: "here"))
Because my data are like
print(data)
>>> "<a href="www.google.com">here</a>"
how could I handle this?