Can't Use UIButton.isHidden = false. How could I hide my button then?

时间:2018-02-03 10:28:16

标签: swift xcode uibutton

override func viewDidLoad() {
        super.viewDidLoad()
        button.isHidden = false
    }

I am trying to hide the button right at the beginning then if a value is true, then I would show the button. How could I do it?

1 个答案:

答案 0 :(得分:0)

For hiding use:

    button.alpha = 0

or

    button.isHidden = true