- IRSingleButtonGroup is a powerful buttons group framework for iOS.
- See swift version in here: IRSingleButtonGroup-swift.
- Single Button Selection.
- Single Button Selection Demo: Deselect able.
- Multi Buttons Selection.
- Add
pod 'IRSingleButtonGroup'
in thePodfile
pod install
- more examples in the demo applications.
IRSingleButtonGroup* singleButtonGroup = [[IRSingleButtonGroup alloc] init];
singleButtonGroup.buttons = @[self.button1, self.button2, self.button3];
singleButtonGroup.delegate = self;
#pragma mark - SingleButtonGroupDelegate
- (void)didSelectedButton:(UIButton *)button {
NSLog(@"Button%ld", button.tag);
}
- (void)didDeselectedButton:(UIButton *)button {
NSLog(@"Button%ld", button.tag);
}
singleButtonGroup.canMultiSelected = NO;
singleButtonGroup.canSelectWhenSelected = YES;
[singleButtonGroup setInitSelected:0];