<!--
{
  "availability" : [
    "iOS: 5.0.0 -",
    "iPadOS: 5.0.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UISearchBar/searchFieldBackgroundImage(for:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UISearchBar(im)searchFieldBackgroundImageForState:"
  },
  "title" : "searchFieldBackgroundImage(for:)"
}
-->

# searchFieldBackgroundImage(for:)

Returns the search text field image for a given state.

```
func searchFieldBackgroundImage(for state: UIControl.State) -> UIImage?
```

## Parameters

`state`

A control state.

    Valid states are [`normal`](/documentation/UIKit/UIControl/State-swift.struct/normal)     and [`disabled`](/documentation/UIKit/UIControl/State-swift.struct/disabled)    .

## Return Value

The search text field image to use for `state`.

## Discussion

---

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)