How do I change the name of button A when button B is pressed?
1 answer
You cannot use it sender
for your needs. Because sender
- is the button you clicked on, not the one you want to change the name.
So, you need to make IBOutlet
your buttons look like you by creating your IBAction. Then you can call it like this:
yourButton.setTitle("Title", forState: UIControlState.Normal)
+7
source to share