---
title: "setShowsScope(_:animated:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uisearchbar/setshowsscope(_:animated:)"
---

# setShowsScope(_:animated:)

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

## Declaration

```swift
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

Discussion If the search bar is owned by a UISearchController, then calling this method implicitly sets the search controller’s automaticallyShowsScopeBar property to false.

## See Also

### Configuring scope bar buttons

- [scopeButtonTitles](uikit/uisearchbar/scopebuttontitles.md)
- [selectedScopeButtonIndex](uikit/uisearchbar/selectedscopebuttonindex.md)
- [showsScopeBar](uikit/uisearchbar/showsscopebar.md)
