DLRadioButton icon indicating copy to clipboard operation
DLRadioButton copied to clipboard

Deselect radio button after it's been selected.

Open nikoagge opened this issue 6 years ago • 3 comments

Has anyone found how to do this programmatically in Swift?

nikoagge avatar May 26 '18 06:05 nikoagge

var shouldSelect: Bool = true @IBAction func radioButtonClicked() { DispatchQueue.main.asyncAfter(deadline: .now() + 0.3) { self.radioButton.isSelected = self.shouldSelect self.shouldSelect = !self.shouldSelect }

}

aleksandrovych avatar May 30 '18 15:05 aleksandrovych

Hi you can just assign the radio button you used to false

E.g self.radioButton.isSelected = false

antoniohart avatar Jan 22 '19 11:01 antoniohart

There's an option to config it without an outlet. If you do want to toggle, you can actually set isMultipleSelectionEnabled property to true. Please see this issue.

yoni-g avatar Jun 08 '21 07:06 yoni-g