RSDChoicePickerDataSource
public protocol RSDChoicePickerDataSource : RSDPickerDataSource
A picker data source for selecting choices.
-
Returns the number of ‘columns’ to display.
Declaration
Swift
var numberOfComponents: Int -
Returns the # of rows in each component.
Declaration
Swift
func numberOfRows(in component: Int) -> IntParameters
componentThe component (or column) of the picker.
Return Value
The number of rows in the given component.
-
Returns the choice for this row/component. If this is returns
nilthen this is theskip
choice.Declaration
Swift
func choice(forRow row: Int, forComponent component: Int) -> RSDChoice?Parameters
rowThe row for the selected component.
componentThe component (or column) of the picker.
-
Returns the selected answer created by the union of the selected rows.
Declaration
Swift
func selectedAnswer(with selectedRows: [Int]) -> Any?Parameters
selectedRowsThe selected rows, where there is a selected row for each component.
Return Value
The answer created from the given array of selected rows.
-
Returns the selected rows that match the given selected answer (if any).
Declaration
Swift
func selectedRows(from selectedAnswer: Any?) -> [Int]?Parameters
selectedAnswerThe selected answer.
Return Value
The selected rows, where there is a selected row for each component, or
nilif not all rows are selected.
View on GitHub
RSDChoicePickerDataSource Protocol Reference