For Swift 5:
var attributes = [NSAttributedString.Key: AnyObject]()
attributes[.foregroundColor] = UIColor.red
let attributedString = NSAttributedString(string: "Very Bad", attributes: attributes)
label.attributedText = attributedString
For Swift 4:
var attributes = [NSAttributedStringKey: AnyObject]()
attributes[.foregroundColor] = UIColor.red
let attributedString = NSAttributedString(string: "Very Bad", attributes: attributes)
label.attributedText = attributedString
For Swift 3:
var attributes = [String: AnyObject]()
attributes[NSForegroundColorAttributeName] = UIColor.red
let attributedString = NSAttributedString(string: "Very Bad", attributes: attributes)
label.attributedText = attributedString