Use multiple font colors in a single label
Reference from here. First of all initialize of you NSString and NSMutableAttributedString as below. var myString:NSString = “I AM KIRIT MODI” var myMutableString = NSMutableAttributedString() In ViewDidLoad override func viewDidLoad() { myMutableString = NSMutableAttributedString(string: myString, attributes: [NSFontAttributeName:UIFont(name: “Georgia”, size: 18.0)!]) myMutableString.addAttribute(NSForegroundColorAttributeName, value: UIColor.redColor(), range: NSRange(location:2,length:4)) // set label Attribute labName.attributedText = myMutableString super.viewDidLoad() } OUTPUT MULTIPLE … Read more