rocket101 rocket101 - 1 year ago 165
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?


Answer Source

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.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download