lexrus / LTMorphingLabel

[EXPERIMENTAL] Graceful morphing effects for UILabel written in Swift.
MIT License
8.07k stars 782 forks source link

Allow setting additional textAttributes to label #106

Closed rivera-ernesto closed 6 years ago

rivera-ernesto commented 6 years ago

It would be ideal to support attributedText properly, but in the mean time this will work just fine for most cases.

rivera-ernesto commented 6 years ago

Sample

let shadow = NSShadow()
shadow.shadowColor = UIColor.darkGray
shadow.shadowBlurRadius = 3.0
let textAttributes: [NSAttributedStringKey: Any] = [
    .strokeColor: UIColor.black,
    .strokeWidth: -3.0,
    .shadow: shadow
]

label.textAttributes = textAttributes

2018-02-24 10 04 18

lexrus commented 6 years ago

Awesome. Thank you.