Change only fontsize of NSAttributedString
问题 I have a NSAttributedString that was loaded from a RTF file, so it already holds several font-attributes for different ranges. Now I want to adapt the font size to the screensize of the device, but when I add a whole new font attribute with a new size, the other fonts disappear. Is there a way to change only the font size for the whole string? 回答1: If you only want to change the size of any given font found in the attributed string then you can do: let newStr = someAttributedString