A builder-style wrapper for NSAttributedString.
- iOS 9 (or macOS 10.10)
- Swift 5.0
The following example demonstrates creating an attributed string.
// Optional: Create an alias for NSAttributedString
typealias AttributedString = NSAttributedString
let value = AttributedString(string: "Hello, world!")
.font(.largeTitle)
.foregroundColor(.darkGray)
.backgroundColor(.yellow)
.lineSpacing(50)
This package utilizes the UIKit
or Cocoa
framework (depending on platform), both of which are property of Apple Inc.
AttributedBuilder is an independent open source effort and has not been authorized, sponsored, or otherwise approved by Apple Inc.