If you look closely to the bottom of the UISearchBar
in a UISearchDisplayController
, you'll notice it has a subtile drop shadow. This shadow doesn't fit in the design of the app I'm currently working on, so I'm trying to remove/hide it. Unfortunately I have not yet succeeded.
During my research into this drop shadow, I found that it's not part of the UISearchBar
. When I remove the UISearchDisplayController
's UISearchBar
from its superview in - (void)searchDisplayControllerWillBeginSearch:(UISearchDisplayController *)controller
, the shadow remains visible.
The shadow turned out to be part of the UISearchDisplayController's
searchResultsTableView
: when I hide the searchResultsTableView
, the shadow disappears. However, I have not been able to trace down the view that has the shadow on its layer. I tried recursively iterating through all visible views (starting at [[UIApplication sharedApplication] window]) and then hiding the drop shadow of each view and setting its clipsToBounds
property to YES, which also did not yield the desired result.
Any ideas?