<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UISearchTextField/searchSuggestions",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UISearchTextField(py)searchSuggestions"
  },
  "title" : "searchSuggestions"
}
-->

# searchSuggestions

A list of suggestions to offer as shortcuts below the search field.

```
var searchSuggestions: [any UISearchSuggestion]? { get set }
```

## Discussion

Provide search suggestions to help people complete their query quickly. Update the suggestions as a person types by registering for the [`textDidChangeNotification`](/documentation/UIKit/UITextField/textDidChangeNotification) notification and implementing [`textFieldDidEndEditing(_:reason:)`](/documentation/UIKit/UITextFieldDelegate/textFieldDidEndEditing(_:reason:)).

The suggestions appear in a menu under the search field. When you assign new suggestions to this property, the suggestions onscreen refresh automatically. When a person chooses a suggestion, the system sets this property to `nil` and dismisses the search suggestions menu. Implement [`searchTextField(_:didSelect:)`](/documentation/UIKit/UISearchTextFieldDelegate/searchTextField(_:didSelect:)) in your delegate to execute any necessary updates when a person chooses a suggestion.

If the search suggestions menu dismisses for other reasons, such as a person tapping outside the search bar, [`searchSuggestions`](/documentation/UIKit/UISearchTextField/searchSuggestions) doesn’t reset to `nil` immediately. The system sets [`searchSuggestions`](/documentation/UIKit/UISearchTextField/searchSuggestions) to `nil` only when a person interacts with search directly — for example, by typing in the search field, canceling search, or changing the search scope using the search bar’s scope bar. To dismiss the menu manually, set this property to `nil` or `[]`.

> Important:
> UIKit allows setting this property directly on an instance of ``doc://com.apple.uikit/documentation/UIKit/UISearchTextField`` only when the search field isn’t associated with a ``doc://com.apple.uikit/documentation/UIKit/UISearchController``. If the search field is associated with a search controller, the system raises an <doc://com.apple.documentation/documentation/Foundation/NSExceptionName/invalidArgumentException> to use the ``doc://com.apple.uikit/documentation/UIKit/UISearchController/searchSuggestions`` property on ``doc://com.apple.uikit/documentation/UIKit/UISearchController`` instead.

---

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)