Reputation: 2226
I want to make it so that when I tap a UIButton, the rest of buttons are disabled until I click a refresh button.
I have 5 IBOutlets that I want to disable not including the refresh Button. Is there a function that stops the events that I can tie to the rest of the buttons? I don't even know where to start.
Thanks a lot in advance!
Upvotes: 1
Views: 1041
Reputation: 2226
Hey so I got it to work! I did some more research and there's a duplicate of this post. Everything is explained here:
Disable and Enable UIButton - XCode Swift
Thanks a lot anyways.
Upvotes: 0
Reputation: 1500
Connects a method (IBAction) to the button that must disable other. Within the method, for each button (connected in the GUI) type the follow line:
button.enabled = false
Upvotes: 2