Julian Pomper Julian Pomper - 5 months ago 40
Swift Question

Old UILabel text stays in background

I want to change the text of an

, but when I set the new text, the old one stays in the background and they are over each other.

Here is what it looks like:
enter image description here

I tried to set the
text nil or "" but its the same result.

self.nameLabel.text = ""
self.nameLabel.text = self.user.getFullName()


I added the UILabel in the viewDidLayoutSubviews() so there were multiple labels in it because viewDidLayoutSubviews() was called multiple times.