Latest 1.1.0
Homepage https://github.com/yonat/RadioGroup
License MIT
Platforms ios 9.0, requires ARC
Dependencies MiniLayout
Authors

RadioGroup

Swift Version
Build Status
License
CocoaPods Compatible
Platform
PRs Welcome

The missing iOS radio buttons group.

Usage

let radioGroup = RadioGroup(titles: ["First Option Title", "Another Option Title", "Last"])
radioGroup.selectedIndex = 0
radioGroup.addTarget(self, action: #selector(optionSelected), forControlEvents: .valueChanged)

Changing Appearance

Layout:

radioGroup.titleAlignment = .right
radioGroup.isButtonAfterTitle = true // default is false => button left (leading) relative to title

Color:

radioGroup.tintColor = .green // surrounding ring
radioGroup.selectedColor = .red // center circle

Size:

radioGroup.buttonSize = 42.0
radioGroup.spacing = 12 // vertical spacing between options
radioGroup.itemSpacing = 12 // horizontal spacing between button and title

Installation

CocoaPods:

pod 'RadioGroup'

Manually:

Copy Sources/*.swift and MiniLayout.swift to your Xcode project.

Meta

@yonatsharon

https://github.com/yonat/RadioGroup

Latest podspec

{
    "name": "RadioGroup",
    "version": "1.1.0",
    "summary": "The missing iOS radio buttons group.",
    "homepage": "https://github.com/yonat/RadioGroup",
    "screenshots": "https://raw.githubusercontent.com/yonat/RadioGroup/master/Screenshots/RadioGroup.png",
    "license": {
        "type": "MIT",
        "file": "LICENSE.txt"
    },
    "authors": {
        "Yonat Sharon": "[email protected]"
    },
    "social_media_url": "http://twitter.com/yonatsharon",
    "swift_version": "4.2",
    "platforms": {
        "ios": "9.0"
    },
    "requires_arc": true,
    "source": {
        "git": "https://github.com/yonat/RadioGroup.git",
        "tag": "1.1.0"
    },
    "source_files": "Sources/*.swift",
    "dependencies": {
        "MiniLayout": []
    }
}

Pin It on Pinterest

Share This