We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
当自定义搜索建议的cell且searchTextDidChange中执行搜索时,搜索结果列表没有刷新。查看源代码为
- (void)setSearchSuggestions:(NSArray<NSString *> *)searchSuggestions { if ([self.dataSource respondsToSelector:@selector(searchSuggestionView:cellForRowAtIndexPath:)]) { // set searchSuggestion is nil when cell of suggestion view is custom. _searchSuggestions = nil; return; } _searchSuggestions = [searchSuggestions copy]; self.searchSuggestionVC.searchSuggestions = [searchSuggestions copy]; self.baseSearchTableView.hidden = !self.searchSuggestionHidden && [self.searchSuggestionVC.tableView numberOfRowsInSection:0]; self.searchSuggestionVC.view.hidden = self.searchSuggestionHidden || ![self.searchSuggestionVC.tableView numberOfRowsInSection:0]; }
通过源代码可知道,当有自定义cell时,就直接return了,也就不会执行的searchSuggestionVC.tablevew reload。所以我修改了一下,修改为当有自定义cell时,也会reload一下;
- (void)setSearchSuggestions:(NSArray<NSString *> *)searchSuggestions { if ([self.dataSource respondsToSelector:@selector(searchSuggestionView:cellForRowAtIndexPath:)]) { // set searchSuggestion is nil when cell of suggestion view is custom. [self.searchSuggestionVC.tableView reloadData]; _searchSuggestions = nil; return; } _searchSuggestions = [searchSuggestions copy]; self.searchSuggestionVC.searchSuggestions = [searchSuggestions copy]; self.baseSearchTableView.hidden = !self.searchSuggestionHidden && [self.searchSuggestionVC.tableView numberOfRowsInSection:0]; self.searchSuggestionVC.view.hidden = self.searchSuggestionHidden || ![self.searchSuggestionVC.tableView numberOfRowsInSection:0]; }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
当自定义搜索建议的cell且searchTextDidChange中执行搜索时,搜索结果列表没有刷新。查看源代码为
通过源代码可知道,当有自定义cell时,就直接return了,也就不会执行的searchSuggestionVC.tablevew reload。所以我修改了一下,修改为当有自定义cell时,也会reload一下;
The text was updated successfully, but these errors were encountered: