1 2 3 4 5 6 7 8 9 10 |
let attributsBold = [NSAttributedString.Key.font: UIFont.systemFont(ofSize: 13.0, weight: .bold), NSAttributedString.Key.foregroundColor: UIColor.AppPrimaryColor] let attributsNormal = [NSAttributedString.Key.font: UIFont.systemFont(ofSize: 13.0, weight: .regular), NSAttributedString.Key.foregroundColor: UIColor.AppSlate] let attributedString = NSMutableAttributedString(string: "Bold Text", attributes:attributsBold) let boldStringPart = NSMutableAttributedString(string: "Regular Text", attributes:attributsNormal) attributedString.append(boldStringPart) UITextViewObject.attributedText = attributedString |