UISearchBar as a Subtitle for a UITableView

I have UITableViewone that has a subview UISearchBarconnected through Interface Builder. When invoked - (void)searchBarTextDidBeginEditing:(UISearchBar *)searchBar, I install searchBar.showsScopeBar = YESand invoke [searchBar sizeToFit]to actually display the search pane bar.

The problem is that the first cell of my table view is covered by the appearing scope. How can I set table view correctly?

+3
source share
1 answer

Ok, I fixed it. I had a UISearchBar side by side with my UITableView in my xib file and added it as a subview of the table view in code. I switched to this in xib instead, and all is well.

0
source

Source: https://habr.com/ru/post/1765622/


All Articles