Atributika is an easy and painless way to build NSAttributedString. It is able to detect HTML-like tags, links, phone numbers, hashtags, any regex or even standard ios data detectors and style them with various attributes like font, color, etc. Atributika comes with drop-in label replacement AttributedLabel which is able to make any detection clickable. NSAttributedString is really powerful but still a low-level API that requires a lot of work to set up things. It is especially painful if the string is a template and real content is known only in runtime. If you are dealing with localizations, it is also not easy to build NSAttributedString. Operator to concatenate NSAttributedString with other attributed or regular strings. Works on iOS, tvOS, watchOS, macOS.
Features
- Detect and style HTML-like tags using custom speedy parser
- Detect and style hashtags and mentions
- Detect and style links and phone numbers
- Style whole string or just particular ranges
- Clean and expressive API to build styles
- Separate set of detection utils, in case you want to use just them