All Projects → yonat → Radiogroup

yonat / Radiogroup

Licence: mit
The missing iOS radio buttons group.

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Radiogroup

Examples Qt
Shows how to use Qt widgets only by programming code (c++17).
Stars: ✭ 38 (-66.37%)
Mutual labels:  radio-buttons
Lthradiobutton
A radio button with a pretty animation
Stars: ✭ 303 (+168.14%)
Mutual labels:  radio-buttons
Form Js
Easily create web forms. Supports Meteor, AngularJS, React, Polymer and any CSS library, e.g. Bootstrap.
Stars: ✭ 9 (-92.04%)
Mutual labels:  radio-buttons
django-radiogrid
Django radio grid field
Stars: ✭ 28 (-75.22%)
Mutual labels:  radio-buttons
homebridge-switcheroo
Simple on/off or multiswitch radio buttons for http reqs. Useful for lights, A/V systems, home automation, whatever
Stars: ✭ 38 (-66.37%)
Mutual labels:  radio-buttons
Segmentedbutton
Segmented Control with animation for Android API 12+
Stars: ✭ 352 (+211.5%)
Mutual labels:  radio-buttons
Examples FLTK
Shows how to use Fltk controls only by programming code (c++17).
Stars: ✭ 28 (-75.22%)
Mutual labels:  radio-buttons
Multipicker
Form styling plugin for jQuery
Stars: ✭ 90 (-20.35%)
Mutual labels:  radio-buttons
Examples Win32
Shows how to use Win32 controls by programming code (c++17).
Stars: ✭ 22 (-80.53%)
Mutual labels:  radio-buttons
React Native Radio Buttons
[DEPRECATED] A Radio-button like logic wrapper for React Native
Stars: ✭ 418 (+269.91%)
Mutual labels:  radio-buttons
RadioGroup
支持多行多列等复杂布局的RadioGroup,重点是!!使用简单!!,称之为Multi_RadioGroup_Plus吧
Stars: ✭ 26 (-76.99%)
Mutual labels:  radio-buttons
Examples Gtkmm
Shows how to use Gtkmm controls by programming code (c++17).
Stars: ✭ 23 (-79.65%)
Mutual labels:  radio-buttons
Xamarin.forms.inputkit
CheckBox, Radio Button, Labeled Slider, Dropdowns etc.
Stars: ✭ 372 (+229.2%)
Mutual labels:  radio-buttons
react-native-radio-buttons-group
Simple, best and easy to use radio buttons for react native apps.
Stars: ✭ 145 (+28.32%)
Mutual labels:  radio-buttons
Dlradiobutton
Radio Button for iOS
Stars: ✭ 872 (+671.68%)
Mutual labels:  radio-buttons
pretty-checkbox-react
A tiny react/preact wrapper around pretty-checkbox
Stars: ✭ 35 (-69.03%)
Mutual labels:  radio-buttons
Togglebuttongroup
A group of flowable toggle buttons, with multiple / single selection support and button customization.
Stars: ✭ 343 (+203.54%)
Mutual labels:  radio-buttons
Selectionlist
Simple single-selection or multiple-selection checklist, based on UITableView
Stars: ✭ 93 (-17.7%)
Mutual labels:  radio-buttons
Magic Input
CSS3 Styles for Checkbox and Radio Button inputs look prettier. with only one element.
Stars: ✭ 81 (-28.32%)
Mutual labels:  radio-buttons
Quicktableviewcontroller
A simple way to create a UITableView for settings in Swift.
Stars: ✭ 417 (+269.03%)
Mutual labels:  radio-buttons

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)

SwiftUI Usage

RadioGroupPicker(selectedIndex: $selection, titles: ["One", "Two", "Three"])
    .fixedSize()

Changing Appearance

The properties below can be set in Interface Builder, in code, or through a UIAppearance proxy (e.g., RadioGroup.appearance().titleColor = .red). When using SwiftUI you can set them in the RadioGroupPicker initializer, or use as view modifiers (e.g., .buttonSize(32)). .

Layout:

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

Color and Font:

radioGroup.tintColor = .green       // surrounding ring
radioGroup.selectedColor = .red     // inner circle (default is same color as ring)
radioGroup.selectedTintColor = .blue  // selected radio button's surrounding ring (default is tintColor)

radioGroup.titleColor = .blue
radioGroup.titleFont = myFont

Or use attributed strings:

radioGroup.attributedTitles = [
    NSAttributedString(string: "Italic", attributes: [.obliqueness: 0.3]),
    NSAttributedString(string: "Underline", attributes: [.underlineStyle: 1]),
]

Size:

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

Button appearance:

RadioButton.appearance().size = 32              // height=width of button
RadioButton.appearance().ringWidth = 3
RadioButton.appearance().ringSpacing = 7        // space between outer ring and inner circle
RadioButton.appearance().selectedColor = .blue  // color of inner circle

Installation

CocoaPods:

pod 'RadioGroup'

Swift Package Manager:

dependencies: [
    .package(url: "https://github.com/yonat/RadioGroup", from: "1.4.3")
]

Meta

@yonatsharon

https://github.com/yonat/RadioGroup

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].