RadioGroup alternatives and similar libraries
Based on the "Button" category.
Alternatively, view RadioGroup alternatives based on common mentions on social networks and blogs.
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest. Visit our partner's website for more details.
Do you think we are missing an alternative of RadioGroup or a related project?
The missing iOS radio buttons group.
let radioGroup = RadioGroup(titles: ["First Option Title", "Another Option Title", "Last"]) radioGroup.selectedIndex = 0 radioGroup.addTarget(self, action: #selector(optionSelected), forControlEvents: .valueChanged)
RadioGroupPicker(selectedIndex: $selection, titles: ["One", "Two", "Three"])
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.,
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.titleColor = .blue radioGroup.titleFont = myFont
Or use attributed strings:
radioGroup.attributedTitles = [ NSAttributedString(string: "Italic", attributes: [.obliqueness: 0.3]), NSAttributedString(string: "Underline", attributes: [.underlineStyle: 1]), ]
radioGroup.buttonSize = 42.0 radioGroup.spacing = 12 // spacing between buttons radioGroup.itemSpacing = 12 // horizontal spacing between button and title
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
Swift Package Manager:
dependencies: [ .package(url: "https://github.com/yonat/RadioGroup", from: "1.4.2") ]
*Note that all licence references and agreements mentioned in the RadioGroup README section above are relevant to that project's source code only.