0

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

Community
  • 1
  • 1
shinoys222
  • 414
  • 2
  • 6
  • 1
    `replaceCharactersInRange:withAttributedString:`? Or do you have an example of the initial `NSAttributedString`, replacement, end wanted final one? – Larme Mar 29 '16 at 08:52
  • 'replaceCharactersInRange:withAttributedString' worked . Thanks – shinoys222 Mar 29 '16 at 16:32

0 Answers0