我想用另一个NSAttributedString替换NSAttributedString(其中包含NSTextAttachments)的子字符串(例如@“replaceString”)。
我曾尝试使用NSMutableAttributedString的mutableString,但结果是省略了NSTextAttachments。以下答案不符合我的情况。
Replace substring of NSAttributedString with another NSAttributedString