Quickly create NSAttributedString with TextAttributes
let attributes = TextAttributes()
.font(UIFont.systemFontOfSize(14))
.alignment(.Center)
.foregroundColor(UIColor(white: 0.7, alpha: 1))
let attributedText = NSAttributedString(string: "Hello, NSAttributedText", attributes: attributes)
let attributedText = "Hello, NSAttributedText"
.attributed {
TextAttributes()
.font(UIFont.systemFontOfSize(14))
.alignment(.Center)
.foregroundColor(UIColor(white: 0.7, alpha: 1))
}
TextAttributesUtil is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "TextAttributesUtil"
muukii, m@muukii.me
TextAttributesUtil is available under the MIT license. See the LICENSE file for more info.