1) Use addAttribute instead of setAttributes to avoid losing other attributes besides .foregroundColor.
2) If the .foregroundColor attribute is not specified in the NSAttributedString, should be used UILabel textColor. This is standard behavior. Otherwise, the color of the UILabel text does not change.
1) Use addAttribute instead of setAttributes to avoid losing other attributes besides .foregroundColor. 2) If the .foregroundColor attribute is not specified in the NSAttributedString, should be used UILabel textColor. This is standard behavior. Otherwise, the color of the UILabel text does not change.