I\'m using attributed text in a UITextView. The text contain many fonts.
I\'m looking for a way to replace a particular font by another one.
Any swift approa
There is a method called attributesAtIndex(_:effectiveRange:). This method returns a dictionary that you can get the font from.
You will need to iterate over each index to store the fonts. It will be slow, because in text files the font could potentially change every character. So I would recommend doing this off the main thread.