0

を入れUISearchBarましUINavigationBarたが、問題は をクリックするUISearchBarUINavigatioBar非表示になります。これを修正するにはどうすればよいですか?

コード:

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;
}
4

0 に答える 0