Skip to content

Bold font not staying #64

@marcheimendinger

Description

@marcheimendinger

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions