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

# isEnabled

A Boolean value indicating whether the search bar is in the enabled state.

```
var isEnabled: Bool { get set }
```

## Discussion

Set the value of this property to `true` to enable the search bar or `false` to disable it. An enabled search bar responds to user interactions; a disabled search bar ignores touch events and takes on a disabled appearance.

If the search bar is associated with a [`UINavigationItem`](/documentation/UIKit/UINavigationItem) with [`inline`](/documentation/UIKit/UINavigationItem/SearchBarPlacement-swift.enum/inline), then the minimized (icon-only) [`UISearchBar`](/documentation/UIKit/UISearchBar) won’t grow to the text field while [`isEnabled`](/documentation/UIKit/UISearchBar/isEnabled) is `false`.

The default value of this property is `true` for a newly created search bar. You can set the search bar’s initial enabled state in your storyboard file.

---

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)