我在i-9的objective-c中使用UISearchController
并面临一个非常不寻常的问题,请参阅下图:
我用self.automaticallyAdjustsScrollViewInsets = NO;
尝试了各种各样的事情
并且重新构思视图,但没有任何作用,任何人都可以帮忙解决这个问题吗?
下面是我设置UISearchController的代码
UITableViewController *searchResultsController = [[self storyboard] instantiateViewControllerWithIdentifier:@"SearchResultsViewController"];
self.searchController=[[UISearchController alloc]initWithSearchResultsController:searchResultsController];
self.searchController.searchResultsUpdater=self;
self.searchController.dimsBackgroundDuringPresentation=NO;
self.searchController.searchBar.placeholder = @"Enter city";
self.searchController.searchBar.delegate = self;
self.searchController.searchBar.tintColor=[UIColor whiteColor];
self.searchController.searchBar.backgroundColor=[UIColor blackColor];
self.searchController.searchBar.barTintColor=[UIColor blackColor];
self.searchTableView.tableHeaderView = self.searchController.searchBar;
self.searchController.hidesNavigationBarDuringPresentation=YES;