如何在swift中附加两个NSMutableAttributeString

时间:2016-05-27 06:31:03

标签: swift nsmutablestring nsmutableattributedstring

如何在swift中将两个NSMutableAttributeString连接成单个NSMutableAttributeString

1 个答案:

答案 0 :(得分:0)

简单试试这个:

let a = NSMutableAttributedString(string: "Hello")
let b = NSMutableAttributedString(string: "world!")
a.appendAttributedString(b)

print("final string =\(a)")