<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.1.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UISearchToken/init(icon:text:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UISearchToken(cm)tokenWithIcon:text:"
  },
  "title" : "init(icon:text:)"
}
-->

# init(icon:text:)

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

```
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

A new search token.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)