DLRadioButton
DLRadioButton copied to clipboard
DLRadioButton used in TableviewCell is defaulted to "selected" when cell is loaded
I have a DLRadioButton in a table view cell, with isMultipleSelectionEnabled
set to true
to use this as checkboxes, but when the cells are loaded, the checkbox is defaulted to selected
for a second before resetting back to default
Note: this reloading issue does not happen when isMultipleSelectionEnabled
is not set to true
@DavydLiu any input on this is appreciated
I worked around this by setting the animation duration to 0. Then in DLRadioButton.m I did the following:
- (void)touchUpInside {
[self setAnimationDuration:0.3];
if (self.isMultipleSelectionEnabled) {
[self setSelected:!self.isSelected];
} else {
[self setSelected:YES];
}
}