0
private lazy var contentLabel: UILabel = {
    let label = UILabel()
    label.translatesAutoresizingMaskIntoConstraints = false
    label.font = .regularDMSans(of: ThreadDetailConstants.contentLabelFontSize)
    label.textColor = .darkInputFilled
    label.numberOfLines = ThreadDetailConstants.numberOfLines
    return label
}()

override func updateContent() {
    super.updateContent()
    contentLabel.text = content?.text
}

When I press the content.text to the screen, the text that the user writes is printed. Sometimes users enter links to this content. The links entered must be clickable and in blue color.How can I do that?

HangarRash
  • 7,314
  • 5
  • 5
  • 32
Miaperolla
  • 25
  • 4
  • Does [this](https://stackoverflow.com/questions/50505334/how-can-i-accurately-detect-if-a-link-is-clicked-inside-uilabels-in-swift-4#:~:text=You%20can%20easily%20detect%20the,to%20retrieve%20your%20clicked%20urls.) help? – tanmoy Feb 20 '23 at 21:30
  • or [this](https://stackoverflow.com/questions/1256887/create-tap-able-links-in-the-nsattributedstring-of-a-uilabel/65980444#65980444)? – tanmoy Feb 20 '23 at 21:31

0 Answers0