Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/irons163/irradiobutton-ios-swift
IRRadioButton-iOS-swift is a powerful radio button for iOS.
https://github.com/irons163/irradiobutton-ios-swift
ios radio-button radio-buttons radio-buttons-group radiobutton radiobuttons
Last synced: about 2 months ago
JSON representation
IRRadioButton-iOS-swift is a powerful radio button for iOS.
- Host: GitHub
- URL: https://github.com/irons163/irradiobutton-ios-swift
- Owner: irons163
- License: mit
- Created: 2021-08-04T01:29:10.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-08-04T06:44:20.000Z (over 3 years ago)
- Last Synced: 2024-11-03T14:47:54.496Z (2 months ago)
- Topics: ios, radio-button, radio-buttons, radio-buttons-group, radiobutton, radiobuttons
- Language: Swift
- Homepage:
- Size: 63.5 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
![Build Status](https://img.shields.io/badge/build-%20passing%20-brightgreen.svg)
![Platform](https://img.shields.io/badge/Platform-%20iOS%20-blue.svg)# IRRadioButton-iOS-swift
- IRRadioButton-iOS-swift 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-swift'` 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:
![Interface Builder ](./ScreenShots/demo1.png)Alternatively group the buttons using single line of code:
```swift
radio1.groupButtons = [radio1, radio2, radio3]
```Select any button, and all other button in the same group become deselected automatically:
```swift
radio2.setSelected(true) // radio1 and radio3 become deselected
```And a helpful method to select button by tag:
```swift
radio1.setSelectedWithTag(kTagRadio3)
```## Screenshots
![Demo](./ScreenShots/demo2.png)## Copyright
##### This project is inspired from [RadioButton-iOS](https://github.com/onegray/RadioButton-ios).