hattr - parse HTML
The hattr package provides a simple HTML parser to efficiently transform HTML into attributed strings for iOS.
Goals
- No dependencies, except for UIKit
- Offloadable from main thread
- 😘
Example
import HTMLAttributor
// html is a HTML String
let hattr = HTMLAttributor()
let tree = try! hattr.parse(html)
let attributedText = try! hattr.attributedString(tree)
Find a runnable example in HTMLPlayground.playground
.