First release of SwiftRichString was take place in December 2016; as many other works it’s born for my own needs; NSAttributedString management is one of the part of UIKit which owes lots from the Objective-C heritage and even if something is changed with Swift 4 it still have plenty room of improvement to fit well in a post Swift world.
SwiftRichString introduced the concept of Style to define and collect a type safe collection of attributes you can apply to a plain or already-attributed string. The new 2.x branch is a total rewrite of the library which suits better with protocol oriented programming approach with several room for future improvements.
Main highlights includes:
- a new optimized codebase; with a protocol oriented approach we have more room to improve the library keeping it clean and typesafe.
- a new central repository for styles allows you to register styles with a name and used them all around the app without code duplication.
- integration with Interface Builder allows you set the style to UI controls (currently UILabel , UITextField and UITextView ) from globally registered styles and leave the library to render the content automatically!