Добавить цвет текста в коде Swift.
Swift 4:
let greenColor = UIColor(red: 10/255, green: 190/255, blue: 50/255, alpha: 1)
let attributedStringColor = [NSAttributedStringKey.foregroundColor : greenColor];
let attributedString = NSAttributedString(string: "Hello World!", attributes: attributedStringColor)
label.attributedText = attributedString
для Swift 3:
let greenColor = UIColor(red: 10/255, green: 190/255, blue: 50/255, alpha: 1)
let attributedStringColor : NSDictionary = [NSForegroundColorAttributeName : greenColor];
let attributedString = NSAttributedString(string: "Hello World!", attributes: attributedStringColor as? [String : AnyObject])
label.attributedText = attributedString