Currently all my buttons and textfields have attributedText
values defined to be attributed strings.
Consider the case with a simple UILabel
. Whenever I have to change the text for this UILabel
(based on some user action), I have to redefine the attributes on the NSAttributedString
. One way is to simply create a subroutine that generates these attributes whenever I require them but that's a concern given there could be a number of different labels (or attributed strings) that would require such convenience methods.
Another could be simply changing the text
field and having observers add those attributes but that's the same amount of work and now probably more complicated.
Is there a simple way of achieving the above without redefining attributes?