Font with attributes in swift 4 and swift 5
Solution:
let attrs = [ NSParagraphStyleAttributeName: style, NSForegroundColorAttributeName :UIColor.white, NSFontAttributeName:UIFont( name: "Trebuchet MS", size: 20)]
swift 5:
let attrs = [NSAttributedString.Key.paragr aphStyle: style,NSAttributedString.Key.f oregroundColor:UIColor.white,N SAttributedString.Key.font:UIF ont(name: "Trebuchet MS", size: 20)]
Comments
Post a Comment