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

# automaticallyShowsScopeBar

A Boolean indicating whether the search controller manages the visibility of the search bar’s scope bar.

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

## Discussion

By default, [`UISearchController`](/documentation/UIKit/UISearchController) shows the search bar’s scope bar when search becomes active and hides it when the user dismisses the search. Set this to <doc://com.apple.documentation/documentation/Swift/false> if you want to show and hide the scope bar in your own code. If you set the [`showsScopeBar`](/documentation/UIKit/UISearchBar/showsScopeBar) property, that also changes this property to <doc://com.apple.documentation/documentation/Swift/false>.

> Note:
> The search bar doesn’t show its scope bar at all if there are fewer than two titles in the search bar’s ``doc://com.apple.uikit/documentation/UIKit/UISearchBar/scopeButtonTitles``.

---

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)