ghysrc / EasyAttributedString

An easy to use AttributedString

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

EasyAttributedString

screenshot

How to use

let str = EasyAttributedStringBuilder(str: "Some Text")
str.firstCharacter().setFont(UIFont.systemFontOfSize(22)).setTextColor(UIColor.blueColor())
str.allRange().setBackgroundColor(UIColor.orangeColor()).setTextColor(UIColor.whiteColor())
str.rangeOfString("kern").setKern(10)
str.rangeWith(7, length: 4).setBaselineOffset(-5)

cell?.textLabel?.attributedText = str.build()

About

An easy to use AttributedString

License:MIT License


Languages

Language:Swift 100.0%