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()
ghysrc / easyattributedstring Goto Github PK
View Code? Open in Web Editor NEWAn easy to use AttributedString
License: MIT License