I have a UITableView that has a subview UISearchBar attached via the Interface Builder. When - (void)searchBarTextDidBeginEditing:(UISearchBar *)searchBar is called, I set searchBar.showsScopeBar = YES and call [searchBar sizeToFit] to actually show the scope bar of the search bar.
The problem is, that the first cell of my table view gets covered by the appearing scope bar. How can I refit the table view correctly?
Well, I fixed it. I had my UISearchBar side-by-side with my UITableView in my xib file, and was adding it as a subview of the table view in code. I switched to doing this in the xib instead and all is well.