RadioSection
open class RadioSection : Section
A section that allows only one option selected in a table view.
-
Initializes a section with a title, containing rows and an optional footer.
Declaration
Swift
public init(title: String?, options: [OptionRowCompatible], footer: String? = nil)
-
The array of rows in the section.
-
A boolean that indicates whether there’s always one option selected.
Declaration
Swift
open var alwaysSelectsOneOption: Bool { get set } -
The array of options in the section. It’s identical to the
rows.Declaration
Swift
open private(set) var options: [OptionRowCompatible] { get } -
Returns the selected index, or nil when nothing is selected.
Declaration
Swift
open var indexOfSelectedOption: Int? { get } -
Returns the selected option row, or nil when nothing is selected.
Declaration
Swift
open var selectedOption: OptionRowCompatible? { get } -
Toggle the selection of the given option and keep options mutually exclusive. If
alwaysSelectOneOptionis set to true, it will not deselect the current selection.Declaration
Swift
open func toggle(_ option: OptionRowCompatible) -> IndexSetParameters
optionThe option to flip the
isSelectedstate.Return Value
The indexes of changed options.
View on GitHub
RadioSection Class Reference