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

# setShowsScope(_:animated:)

Specifies whether the scope bar is displayed, optionally using an animation.

```
func setShowsScope(_ show: Bool, animated animate: Bool)
```

## Parameters

`show`

A Boolean value that indicates whether the scope bar is shown.

`animate`

A Boolean value that indicates whether the scope bar animates when it appears and disappears.

## Discussion

If the search bar is owned by a [`UISearchController`](/documentation/UIKit/UISearchController), then calling this method implicitly sets the search controller’s [`automaticallyShowsScopeBar`](/documentation/UIKit/UISearchController/automaticallyShowsScopeBar) property to <doc://com.apple.documentation/documentation/Swift/false>.

---

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)