Hiding UIBUTTON swift

In quick, how can I hide a UIButton?

Here is what I tried: button.enabled = false

However, this simply deletes the button without making it invisible.

Is there any way to make this quick? If so, how?

Thank!

+4
source share
3 answers

... umm button.hidden = true. See Link to the UIView Class .

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


NOTE. A later version of quick application button.isHidden = trueis the only option.

+7
source

For iOS 8+

button.isHidden = true

Apple Documentation

+4
source

, , :

:

, ViewWillAppear (animated: Bool)

override func ViewWillAppear(animated: Bool) {
button.hidden = true
} 
0

Source: https://habr.com/ru/post/1569007/


All Articles