---
title: selectedScopeButtonIndex
framework: uikit
role: symbol
role_heading: Instance Property
path: uikit/uisearchbar/selectedscopebuttonindex
---

# selectedScopeButtonIndex

The index of the selected scope button.

## Declaration

```swift
var selectedScopeButtonIndex: Int { get set }
```

## Discussion

Discussion The indexes of the scope buttons are determined by the indexes of the strings in scopeButtonTitles.

## See Also

### Configuring scope bar buttons

- [scopeButtonTitles](uikit/uisearchbar/scopebuttontitles.md)
- [showsScopeBar](uikit/uisearchbar/showsscopebar.md)
- [setShowsScope(_:animated:)](uikit/uisearchbar/setshowsscope(_:animated:).md)
