Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
rchong2 opened this issue Mar 9, 2021 · 2 comments

Comments

@rchong2
Copy link

rchong2 commented Mar 9, 2021

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

@acegreen
Copy link

acegreen commented Mar 9, 2021

@DavydLiu any input on this is appreciated

@j-cimb-barker
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants