I have 30 buttons with 3 on each row. I want the user to be able to select one of three per row, with the left column being default ("ee"). I can't seem to make this work...
With the following code I am able to change the color of buttons when they are clicked, but it doesn't deselect upon clicking another button. I want to send the button title string to the "ext" variable, which will tell the app which option the user selected on each row (each row has a different variable)
I am using this code for one row of 3 buttons:
@IBAction func `extension`(_ sender: UIButton) {
ext = String(sender.titleLabel!.text ?? "ee")
sender.backgroundColor = #colorLiteral(red: 0.09334511863, green: 0.1549694077, blue: 0.2597150259, alpha: 1)
sender.isSelected = !sender.isSelected