0

I want to fetch a hmtl-text from Firestore, which can contain links.

Sample content:

This is a test. <p>
Within this text there is a <a href="https://google.com">link to Google</a>
<p>
More text...

How can I display it in a label and making the link automatically clickable? The content may contain more than one or no link.

  • You'd prefer to use a `UITextView` that handle that and with small modification will look like exactly like a `UILabel` to the end user. Or you can use other methods (there are a few on SO, some are using libs) to do so. You can see https://www.wwdcnotes.com/notes/wwdc18/221/ "Choosing the Right Control" why I tend to prefer `UITextView` over some `UILabel` which isn't made in the first place for interaction. – Larme Apr 25 '22 at 08:08

0 Answers0