I am facing an issue with replacing some characters in an attributed string with some attributed characters.
let replaceString = NSMutableAttributedString(string: playerNames[index], attributes: attributes)
taskText.mutableString.replaceOccurrences(of: searchString[Int(index)], with: playerNames[index], options: .caseInsensitive, range: NSRange(location: 0, length: taskText.length))
The problem is, that I can't add the replaceString to the replaceOccurrences function because I can't use attributed strings here. Is there any method other method?
I just want to replace some "#1" and "#2" strings with some names like "Anna" but with bold font to make it more visible.