Creating attributed text from an HTML string

Every now and then you might have found yourself in the need to showing attributed text in your iOS app (e.g. in a UILabel) and considered how easy it is in HTML compared to an NSAttributedString.

Suppose you wanted to have a label with some underlined text, in HTML you would simply do the following:

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Paolo Montalto

Freelance, mobile developer, software craftsman, guitar strummer, husband, father, humble.