项目作者: fitsyu

项目描述 :
the lost Radio Button control for Swift
高级语言: Swift
项目地址: git://github.com/fitsyu/UIRadioButton.git
创建时间: 2016-11-08T09:50:38Z
项目社区:https://github.com/fitsyu/UIRadioButton

开源协议:MIT License

下载


UIRadioButton

Radio Button component for iOS for Swift.
This UI component has nothing to do with :radio: 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. 1. Drag an UIView to your view controller
  2. 2. In Identity Section at the right bar, change the class to UIRadioButton
  3. 3. Customize the color of UIRadioButton
  4. 4. Set initial value (off by default)

From Code

  1. ```Swift
  2. let option1 = UIRadioButton()
  3. let option2 = UIRadioButton(color: UIColor.black() ,selected: true)
  4. \\ init and add later
  5. let group = UIRadioButtonGroup()
  6. group.add( option1 )
  7. group.add( option2 )
  8. \\ init with radio buttons
  9. let group = UIRadioButtonGroup( option1, option2 )
  10. ```

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:

  1. pod "UIRadioButton"

Author

fitsyu, fitsyu2@gmail.com

License

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