Installation instructions
A DSL for creating an NSAttributedString. Original created to demonstrate function builders here.
NSAttributedString
Example:
NSAttributedString { "Hello " .foregroundColor(.blue) "World" .background(.orange) .underline(.red, style: .thick) }
You can install it via the Swift Package Manager in Xcode 11.
Go to File > Swift Packages > Add Package Dependency…
In the text field paste the following: https://github.com/carson-katri/AttributedStringBuilder.
https://github.com/carson-katri/AttributedStringBuilder
Available modifiers:
foregroundColor
background
underline
font
shadow
Feel free to add any that’re missing.
版权所有:中国计算机学会技术支持:开源发展技术委员会 京ICP备13000930号-9 京公网安备 11010802032778号
AttributedStringBuilder
A DSL for creating an
NSAttributedString. Original created to demonstrate function builders here.Example:
Installation
You can install it via the Swift Package Manager in Xcode 11.
Go to File > Swift Packages > Add Package Dependency…
In the text field paste the following:
https://github.com/carson-katri/AttributedStringBuilder.Documentation
Available modifiers:
foregroundColorbackgroundunderlinefontshadowFeel free to add any that’re missing.