dhruvm
dhruvm

Reputation: 2812

i want the physical presence of a label go away -swift

so basically I have a label that represents and networking error. I use the hidden property of the label to make it visible whenever there is no wifi, but the problem is, even if i make the hidden property true, you can still see a blank space in the view that is where the label is supposed to be. I'd like to make the physical presence of the label disappear, not just its visibility.

Upvotes: 0

Views: 84

Answers (1)

Christian
Christian

Reputation: 22343

You can remove it from its parent view:

label.removeFromSuperview()

Upvotes: 2

Related Questions