Closed omarps closed 9 years ago
Most of the time instead of a label you need to map the index of a selected radio button. Right now, as a workaround, I added this swift extension:
extension RadioButton { func index() -> Int { for (index, element) in enumerate(self.groupButtons) { if element.isEqual(self) { return index } } return -1 } } ´´´
The self.groupButtons is not ordered, so I do not think the button index makes sense. You can use button tag instead.
self.groupButtons
tag
Ok, it sounds fair enough.
Most of the time instead of a label you need to map the index of a selected radio button. Right now, as a workaround, I added this swift extension: