DLRadioButton icon indicating copy to clipboard operation
DLRadioButton copied to clipboard

DLRadioButton used in TableviewCell is defaulted to "selected" when cell is loaded

Open rchong2 opened this issue 3 years ago • 2 comments

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

DLRadioBug

rchong2 avatar Mar 09 '21 21:03 rchong2

@DavydLiu any input on this is appreciated

acegreen avatar Mar 09 '21 22:03 acegreen

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];
    }
}

j-cimb-barker avatar Sep 28 '21 15:09 j-cimb-barker