I am trying to customise the display of a text view, by having specific lines in bold, and another color - but I can't seem to figure out how to add another color to the text as well. I have this function;
func attributedText()->NSAttributedString{
let string = "These Terms and Conditions are effective on July 24, 2016.\n\nBye " as NSString
var attributedString = NSMutableAttributedString(string: string as String, attributes: [NSFontAttributeName:UIFont.systemFontOfSize(12.0)])
let boldFontAttribute = [NSFontAttributeName: UIFont.boldSystemFontOfSize(12.0)]
attributedString.addAttributes(boldFontAttribute, range: string.rangeOfString("These Terms and Conditions are effective on July 24, 2016."))
attributedString.addAttributes(boldFontAttribute, range: string.rangeOfString("PLEASE NOTE:"))
// 4
return attributedString
}
What more do I need to set a color for the text as well?