I want to replace a substring (e.g. @"replaceString") of an NSAttributedString (which contains NSTextAttachments in it) with another NSAttributedString.
I have tried to work with the mutableString of NSMutableAttributedString, but result is omitting the NSTextAttachments in it. The answer below doesn't work with my case.
Replace substring of NSAttributedString with another NSAttributedString