https://github.com/irons163/irradiobutton-ios
IRRadioButton-iOS is a powerful radio button for iOS.
https://github.com/irons163/irradiobutton-ios
ios objective-c radio-button radio-buttons radiobutton
Last synced: 2 months ago
JSON representation
IRRadioButton-iOS is a powerful radio button for iOS.
- Host: GitHub
- URL: https://github.com/irons163/irradiobutton-ios
- Owner: irons163
- License: mit
- Created: 2019-12-22T02:23:29.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-12-27T07:51:44.000Z (over 5 years ago)
- Last Synced: 2025-03-20T15:16:28.273Z (2 months ago)
- Topics: ios, objective-c, radio-button, radio-buttons, radiobutton
- Language: Objective-C
- Homepage:
- Size: 61.5 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

# IRRadioButton-iOS
- IRRadioButton-iOS is a powerful radio button for iOS.
- Pretty simple class that extends standard UIButton functionality. Default and selected states can be configured for every button.## Features
- Radio buttons## Install
### Git
- Git clone this project.
- Copy this project into your own project.
- Add the .xcodeproj into you project and link it as embed framework.
#### Options
- You can remove the `demo` and `ScreenShots` folder.### Cocoapods
- Add `pod 'IRRadioButton-iOS'` in the `Podfile`
- `pod install`## Usage
### Basic
It does not need any central manager. Just link the buttons right in Interface Builder, ex:Button A link with B and C:
Alternatively group the buttons using single line of code:
```obj-c
radio1.groupButtons = @[radio1, radio2, radio3];
```Select any button, and all other button in the same group become deselected automatically:
```obj-c
radio2.selected = YES; // radio1 and radio3 become deselected
```Any button from the group knows which one is selected:
```obj-c
IRRadioButton* r1 = radio1.selectedButton;
IRRadioButton* r2 = radio2.selectedButton;
IRRadioButton* r3 = radio3.selectedButton;
NSAssert (r1==r2 && r2==r3, @"Must be equal");
```And a helpful method to select button by tag:
```obj-c
[radio1 setSelectedWithTag:kTagRadio3];
```## Screenshots
## Copyright
##### This project is inspired from [RadioButton-iOS](https://github.com/onegray/RadioButton-ios).