A chain to generate NSAttributedString.
let attrString = "Welcome to use AttrKit.".attr
.foreground(color: .darkGray)
.systemFont(size: 17)
.foreground(color: .red)
.inOccur("AttrKit")
.result()
-
Starting a chain from a String / NSString / NSAttributedString / NSTextAttachment / HTML string / RTF & RTFD data.
-
Setting font, text, paragraph attributes.
-
Setting range of attributes.
-
Setting regex pattern of attributes.
-
Combination of different chains.
-
Batch procedure on same ranges.
-
Reusable attribute style.
-
Transformation from and to HTML string.
-
Transformation from and to RTF & RTFD data.
-
Fixing and removing attributes in a chain.
-
Lower calling of addAttributes function.
-
Supporting text containing Emojii.
0.1.0
You can install AttrKit by using Cocoapods:
pod 'AttrKit'
-
iOS 11.0+ / Mac OS X 10.15+ / tvOS 11.0+
-
Xcode 10.0+
-
Swift 5.0+