You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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 withlabel.font = initialLabelFont
.The text was updated successfully, but these errors were encountered: