Reading time: 8 min

This recipe shows how to format content of a SwiftUI Text with HTML via NSAttributedString on any SwiftUI version. The end result looks like this:

Screenshot%202021-05-26%20at%2014.24.29

There are two solutions in this recipe:

  1. SwiftUI 3 (iOS 15, macOS 12) brings in a new AttributedString wrapper around NSAttributedString...

Continue Reading...