---
title: "init(icon:text:)"
framework: uikit
role: symbol
role_heading: Initializer
path: "uikit/uisearchtoken/init(icon:text:)"
---

# init(icon:text:)

Creates a search token with the specified text and icon (if any).

## Declaration

```swift
init(icon: UIImage?, text: String)
```

## Parameters

- `icon`: An image to display with the text.
- `text`: The text to display on the search token.

## Return Value

Return Value A new search token.

## See Also

### Creating a search token

- [representedObject](uikit/uisearchtoken/representedobject.md)
