Skip to content

fitsyu/UIRadioButton

Repository files navigation

UIRadioButton

Radio Button component for iOS for Swift. This UI component has nothing to do with 📻 it was named that because the buttons in the old radio pop out when other button pressed. More about that can be found here.

CI Status Version License Platform

Preview

Screenshot

How to use

From Storyboard

1. Drag an UIView to your view controller


2. In Identity Section at the right bar, change the class to UIRadioButton


3. Customize the color of UIRadioButton


4. Set initial value (off by default)

From Code

```Swift

let option1 = UIRadioButton()
let option2 = UIRadioButton(color: UIColor.black() ,selected: true)

\\ init and add later
let group = UIRadioButtonGroup()
group.add( option1 )
group.add( option2 )

\\ init with radio buttons
let group = UIRadioButtonGroup( option1, option2 )




```

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

Installation

UIRadioButton is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "UIRadioButton"

Author

fitsyu, [email protected]

License

UIRadioButton is available under the MIT license. See the LICENSE file for more info.

Releases

No releases published

Packages

No packages published