Closed jugsvn closed 10 years ago
Hm.. The idea is to automatically select another button when you deselect the current one.
Agreed. But when you try to deselect all the buttons (when the screen loads or after data refresh), it will always select the first button by default.
So
[self.options[0] setSelected:NO]; [self.options[1] setSelected:NO]; [self.options[2] setSelected:NO]; [self.options[3] setSelected:NO];
will result in the first button being selected.
I've just added method 'deselectAllButtons' for this case. Anyway, I agree the 'setSelected:NO' functionality is ambiguous if there are more then two buttons in the group.
I've updated the 'setSelected:' method. Now the logic is following: If selected==YES, then it selects the button and deselects other buttons in the group. If selected==NO, then it deselects the button and if there are only two buttons in the group, then it selects second.
Thank you for the participation!
Awesome! Thanks mate!
Hey there seems like a bug in the
-(void) setSelected:(BOOL)selected method.
Instead of [rb super_setSelected:selected]; it should rather be [rb super_setSelected:NO];