Nitesh
Nitesh

Reputation: 2024

GET String of UISearchController's scopeButtonTitles

Is it possible to get string of UISearchContoller's segment controls ?

We get index path of that in this way

searchController.searchBar.selectedScopeButtonIndex

But instead of indexPath, I want to get the String.

Upvotes: 0

Views: 83

Answers (1)

Luca Rocchi
Luca Rocchi

Reputation: 6484

searchController.searchBar.scopeButtonTitles![searchController.searchBar.selectedScopeButtonIndex]

Upvotes: 1

Related Questions