I have some text in my attributed string that I am trying to remove. How can I do this without removing the attributes?
What I've tried:
I found this post on SO (Replace substring of NSAttributedString with another NSAttributedString) where OP is looking for the equivalent method to NSString's stringByReplacingOccurrencesOfString:withString: for NSAttributedString. I am new to Swift so I couldn't understand the accepted answer.
I moved on to the other answers and if they weren't written in objective c, they were methods that I could not get to compile.
This is as far as I have been able to get. I couldn't find any other posts on SO with a solution to my problem.