Как на фреймворке BEMCheckBox сделать Radio Button
то есть когда выбираешь один то второй де-активировался?
BEMCheckBox как сделать Radio Button
jan
#1
agafon.aga
#2
Как бы там в документации сразу и описано, прям на той странице что по ссылке открывается:
Group / **Radio Button Functionality**
BEMCheckBoxes can easily be grouped together to form radio button functionality. This will automatically manage the state of each checkbox in the group, so that only one is selected at a time, and can optionally require that the group has a selection at all times.
self.group = [BEMCheckBoxGroup groupWithCheckBoxes:@[self.checkBox1, self.checkBox2, self.checkBox3]];
self.group.selectedCheckBox = self.checkBox2; // Optionally set which checkbox is pre-selected
self.group.mustHaveSelection = YES; // Define if the group must always have a selection
To see which checkbox is selected in that group, just ask for it:
BEMCheckBox *selection = self.group.selectedCheckBox;
To manually update the selection for a group, just set it:
self.group.selectedCheckBox = self.checkBox1;
jan
#3
Я вот сгруппировал. Как дальше его юзать?
let group = BEMCheckBoxGroup(checkBoxes: [manButton, womanButton])