I want to mimic what seem to be the standard UI for using the UISearchBar, and right now I trying to make the rest of the view gray, when I begin searching, and I tried doing that by just setting the background color of the view to gray, but I am using sections in my UITableView, and they are not turning gray. Anybody have any reasons why that is?

The reason you’re not seeing the section headers fade to gray is because they are drawn on top of the gray background, and are opaque; in other words, their
alphais 1.If you’re looking for a suggestion to get the effect you want, my first reflex would be to add an overlay
UIViewas a subview of the area you want to be “grayed out”, and change its background color when certain events occur. Something like this:Then, when you want to “gray out”
viewToBeGrayed, just change the background color ofgrayOverlayto some translucent gray value:Finally, when you want to get rid of the “grayed out” effect, just set the view back to clear:
That should be a good place to start. Comment if you need any additional help.