I am using a UISearchBar and once the user taps the bar (and the keyboard pops up) I want the everything besides the keyboard and UISearchBar to be greyed out. Similar to safari when the search is selected. I do not need past searches. See here:

Anyone have any ideas? I’ve looked through the questions here on StackOverflow and I can’t find anything specific.
Thanks!
You can create a
UIViewthat contains theUISearchBar. And then you can setUIView‘sbackgroundColorto get the gray background.And here’s some sample code: