Hide button in Swift 3

I just started with coding and I really want to know how to hide buttons.

What I want to do when I press my button:

Start: I want the Start button and the Back button to disappear.

This is done using Outlets and Actions.

I was already looking a little, but when I wanted to do this, he said that the do keyword should indicate a block of statements.

I hope someone can help me.

+5
source share
1 answer

Once you plug in your sockets, just change the isHidden property to true.

 IBOutlet weak var startButton: UIButton IBOutlet weak var backButton: UIButton IBAction func tapStart(sender: AnyObject?){ self.startButton.isHidden = true self.backButton.isHidden = true } 
+11
source

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


All Articles