You can use rich text to get the NSMutableAttributedString object through rich text. For UILabel, an attribute is provided@property(nullable, nonatomic,copy) NSAttributedString *attributedText Just assign the generated NSMutableAttributedString object to the attribute of attributedText directly.
Use rich text NSMutableAttributedString
You can use rich text to get the NSMutableAttributedString object through rich text. For UILabel, an attribute is provided
@property(nullable, nonatomic,copy) NSAttributedString *attributedText
Just assign the generated NSMutableAttributedString object to the attribute of attributedText directly.