补充属性设置方式
var string = ASAttributedString("XXX")
string.add(attributes: [.foreground(.red)], range: .init(location: 0, length: string.length))
string.set(attributes: [.foreground(.red)], range: .init(location: 0, length: string.length))
label.attributed.text = string
equal
label.attributed.text = ASAttributedString("XXX").add(attributes: .foreground(.red)).set(attributes: .foreground(.red))