---
title: UISearchTextFieldDelegate
framework: uikit
role: symbol
role_heading: Protocol
path: uikit/uisearchtextfielddelegate
---

# UISearchTextFieldDelegate

The interface for the delegate of a search field.

## Declaration

```swift
@MainActor protocol UISearchTextFieldDelegate : UITextFieldDelegate
```

## Overview

Overview A search field asks its delegate for an NSItemProvider when the user starts to copy or move a token. To support these interactions, set the search field’s delegate to an instance of UISearchTextFieldDelegate that implements searchTextField(_:itemProviderForCopying:) and set the search field’s allowsCopyingTokens property to true. The search field’s pasteDelegate handles pasting and dropping tokens as well as text.

## Topics

### Providing information to copy and drag

- [searchTextField(_:itemProviderForCopying:)](uikit/uisearchtextfielddelegate/searchtextfield(_:itemproviderforcopying:).md)

### Responding to search suggestion selections

- [searchTextField(_:didSelect:)](uikit/uisearchtextfielddelegate/searchtextfield(_:didselect:).md)

## Relationships

### Inherits From

- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [UITextFieldDelegate](uikit/uitextfielddelegate.md)

## See Also

### Search field

- [UISearchTextField](uikit/uisearchtextfield.md)
- [UISearchToken](uikit/uisearchtoken.md)
