FUIListPickerDataSource

public protocol FUIListPickerDataSource: class

An object that adopts the FUIListPickerDataSource protocol is responsible for providing the data and views required to display the list of options available in the FUIListPickerFormCell.

  • Gets the number of rows to be displayed. - returns: If a search is in effect, returns the number of rows in filtered data. Otherwise, returns the number of rows in the original options.

    Declaration

    Swift

    func numberOfRows() -> Int

    Return Value

    If a search is in effect, returns the number of rows in filtered data. Otherwise, returns the number of rows in the original options.

  • This function should return a UITableViewCell at the index position. If isFiltered is true, the index is to the filtered list. If isFiltered is false, the index is to the unfiltered list. - parameter tableView: The UITableView for the cell to be displayed. - parameter index: The index to the array of the items for the cell to be displayed. - parameter isFiltered: Indicates if the index is to the filtered array or not. - returns: The UITableViewCell to be displayed.

    Declaration

    Swift

    func listPickerTableView(_ tableView: UITableView, cellForRowAt index: Int, isFiltered: Bool) -> UITableViewCell

    Parameters

    tableView

    The UITableView for the cell to be displayed.

    index

    The index to the array of the items for the cell to be displayed.

    isFiltered

    Indicates if the index is to the filtered array or not.

    Return Value

    The UITableViewCell to be displayed.