-
Notifications
You must be signed in to change notification settings - Fork 108
Bold font not staying #64
Copy link
Copy link
Open
Description
I have a UILabel which sometimes has an icon and sometimes not. By default the label is set with a bold font in the Storyboard and at the launch it does not contains any icon (the text is simply set with label.text).
If I apply the icon and the text with .setIcon(), the first time the bold attribute will stay but if I run .setIcon() a second time to update the text content, the font will be overwritten with the standard one, being not bold.
The only workaround I found is to store in a variable during viewDidLoad() the original bold font and before each execution of .setIcon() I re-set the original font with label.font = initialLabelFont.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels