I want to show no scope bar when the table is empty (before the search bar edits for the first time), no scope bar when it's editing, and finally show it when editing done. I know about the UISearchBarDelegate protocol, but I don't know how to show/hide the scope bar with animation. I know UISearchBar has setShowsScopeBar:
, but no setShowsScopeBar:animated:
the way it does for setShowsCancelButton:animated
.
Edit
It's important that to call [searchBar sizeToFit]
after showing/hiding the scope bar. Is there a good way to animate this? (Should I do this? It doesn't appear to work.)