dimanche 10 mai 2015

How to disable button touch at the start in Swift

I have this button:

@IBAction func touch(sender: AnyObject) {
println("Hello, world!")
}

and another:

@IBAction func toggle(sender: AnyObject) {
//code to enable touch of button "touch"

I want to disable user touch of "touch" at the start of the app, and enable touch after tapping "toggle", how to realize it by code and in storyboard?

Aucun commentaire:

Enregistrer un commentaire