FUIListPickerSearchResultsUpdating

@objc
public protocol FUIListPickerSearchResultsUpdating

An implementation of FUIListPickerSearchResultsUpdating protocol is responsible to maintain a filtered list of options, based on the search string specified, for the corresponding FUIListPickerDataSource implementation.

Implementation Note:

Depending on the FUIListPickerDataSource, different optional functions in the corresponding FUIListPickerSearchResultsUpdating are required to be implemented. The list picker will not show any item if any of the required functions is not implemented.

The following optional functions are required to be implemented for data source not using unique identifier:

func listPicker(_ listPicker: FUIListPicker, filteredDataSourceContainsItemAt unfilteredIndex: Int) -> Bool

func listPicker(_ listPicker: FUIListPicker, unfilteredDataSourceIndexOfItemAt filteredIndex: Int) -> Int

The following optional functions are required to be implemented for data source using unique identifier but not sectioned:

func listPicker(_ listPicker: FUIListPicker, filteredDataSourceContainsItemWithUniqueIdentifier uniqueIdentifier: String) -> Bool

The following optional functions are required to be implemented for data source using unique identifier and sectioned:

func listPicker(_ listPicker: FUIListPicker, filteredDataSourceContainsItemWithUniqueIdentifier uniqueIdentifier: String) -> Boo
  • Update search results based on the specified searchString.

    Declaration

    Swift

    func listPicker(_ listPicker: FUIListPicker, updateSearchResults forSearchString: String)

    Parameters

    listPicker

    The requesting ListPicker object.

    forSearchString

    The search string. If it is an empty string, the search is ended.

  • Check if the specified index is in filtered list.

    Declaration

    Swift

    @objc
    optional func listPicker(_ listPicker: FUIListPicker, filteredDataSourceContainsItemAt unfilteredIndex: Int) -> Bool

    Parameters

    listPicker

    The requesting ListPicker object.

    unfilteredIndex

    The unfiltered index to be checked.

    Return Value

    True, if the specified index is in filtered list.

  • Gets the index to the original list from the index of filtered list.

    Declaration

    Swift

    @objc
    optional func listPicker(_ listPicker: FUIListPicker, unfilteredDataSourceIndexOfItemAt filteredIndex: Int) -> Int

    Parameters

    listPicker

    The requesting ListPicker object.

    filteredIndex

    The index to the filtered indexes.

    Return Value

    The index to the original list from the index of filtered list.

  • Check if the specified unique identifier is in the filtered list of items, when the property isDataSourceRequiringUniqueIdentifiers of the FUIListPicker is true.

    Important

    This function is required if the property isDataSourceRequiringUniqueIdentifiers of the FUIListPicker is true.

    Declaration

    Swift

    @objc
    optional func listPicker(_ listPicker: FUIListPicker, filteredDataSourceContainsItemWithUniqueIdentifier uniqueIdentifier: String) -> Bool

    Parameters

    listPicker

    The requesting ListPicker object.

    uniqueIdentifier

    The unique identifier to check.

    Return Value

    True, if the specified uniqueIdentifier is in the filtered list.