I have a string have multi font size, I'm use context.attributedString to get the string then I use context.setAttributedString(), the font size of text now change. Do you have any solution to keep the font size
Here is my code
func get() { temp = context.attributedString }
func set() { context.setAttributedString(to: temp) }
| | |
P/s: I found that I can fix this problem by remove mutable.setFontSize(to: fontSize) from this function
I have a string have multi font size, I'm use context.attributedString to get the string then I use context.setAttributedString(), the font size of text now change. Do you have any solution to keep the font size Here is my code func get() { temp = context.attributedString } func set() { context.setAttributedString(to: temp) } | | | P/s: I found that I can fix this problem by remove
mutable.setFontSize(to: fontSize)
from this function