Hello,
I started a Swift Maniaplanet style formatter. Inputs a string, returns a NSAttributedString for style usage on labels and more.
I will use the framework myself in the Maniaplanet Toolkit in later versions for faster parsing of styles. Currently it's using the NSAttributedString HTML parser that is very slow (because it uses webviews on the background, and because of that it isn't threadable, needs to be on main/ui thread).
Code: Select all
let nickname = "$F80$i$S$oToffe$z$06FSmurf $z$n$l[http://goo.gl/y4M9VK][App]$l"
let styledNickname = MPFormatter().parse(nickname).getAttributedString()
Install and usage instructions are in the github readme.md.
Cocoapods definition:
Code: Select all
pod 'MPFormatter', '~> 1.2.0'
Announcement: Version 1.x.x freezed, from now 1.x.x will only get bugfixes.
Toffe