rocket101 rocket101 - 7 months ago 64
Swift Question

Hiding UIBUTTON swift

In swift, how do I hide a UIButton?

Here's what I tried:

button.enabled = false

However, that just greys out the button, not making it invisible.

Is there a way to do it in swift? If so, how?



Umm… button.hidden = true. See UIView Class Reference.

Be sure to look at methods available in parent classes when reading the documentation for a class.