我的申请中有UISearchController
:
self.searchController = [[UISearchController alloc] initWithSearchResultsController:nil];
[self.searchController setSearchResultsUpdater:self];
[self.searchController setDelegate:self];
if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"9.1")) {
self.searchController.obscuresBackgroundDuringPresentation = NO;
}
self.searchController.searchBar.showsCancelButton = YES;
[self.searchBarView addSubview:self.searchController.searchBar];
self.searchController.searchBar.delegate = self;
有什么主意我可以解决这个问题吗?
答案 0 :(得分:0)
将这些代码行添加到您的controller
self.searchController.hidesNavigationBarDuringPresentation = NO;
self.searchController.dimsBackgroundDuringPresentation = NO;
self.definesPresentationContext = YES;
希望它将解决您的问题...如果没有,请在评论中让我知道