を入れUISearchBar
ましUINavigationBar
たが、問題は をクリックするUISearchBar
とUINavigatioBar
非表示になります。これを修正するにはどうすればよいですか?
コード:
searchBar = [[UISearchBar alloc] initWithFrame:CGRectMake(0, 0, 250, 44)];
searchDisplayController = [[UISearchDisplayController alloc] initWithSearchBar:searchBar contentsController:self];
searchDisplayController.delegate = self;
searchDisplayController.searchResultsDataSource = self;
self.tableView.tableHeaderView = searchBar;
-(void)searchBarTextDidBeginEditing:(UISearchBar *)searchBar
-(void)searchBarTextDidBeginEditing:(UISearchBar *)searchBar
{
self.navigationController.navigationBar.hidden = NO;
}