Contents

insertToken(_:at:)

Adds a search token at a specific index.

Declaration

func insertToken(_ token: UISearchToken, at tokenIndex: Int)

Parameters

  • token:

    The search token to be inserted.

  • tokenIndex:

    Within the Tokens array, the index at which to insert the token.

Discussion

If you’re converting part of the search field’s text into a token, use replaceTextualPortion(of:with:at:).

See Also

Adding and removing tokens