RadioSection

open class RadioSection : Section

A section that allows only one option selected in a table view.

Initializer

Section

RadioSection

  • 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 alwaysSelectOneOption is set to true, it will not deselect the current selection.

    Declaration

    Swift

    open func toggle(_ option: OptionRowCompatible) -> IndexSet

    Parameters

    option

    The option to flip the isSelected state.

    Return Value

    The indexes of changed options.