大佬教程收集整理的这篇文章主要介绍了ios搜索栏范围按钮不会更新结果tableview,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
searchBar:(UISearchBar *)searchBar SELEctedScopeButtonIndexDidChange:(NSInteger)SELEctedScope
但它不起作用.我正在使用
-(BOOL)searchDisplayController:(UISearchDisplayController *)controller shouldReloadTableForSearchString:(NSString *)searchString { // Tells the table data source to reload when text changes [self filterContentForSearchText:searchString scope:[[self.searchDisplayController.searchBar scopeButtontitles] objectATindex:[self.searchDisplayController.searchBar SELEctedScopeButtonIndex]]]; // Return YES to cause the search result table view to be reloaded. return YES;
}
-(BOOL)searchDisplayController:(UISearchDisplayController *)controller shouldReloadTableForSearchScope:(NSInteger)searchOption { // Tells the table data source to reload when scope bar SELEction changes [self filterContentForSearchText:self.searchDisplayController.searchBar.text scope:[[self.searchDisplayController.searchBar scopeButtontitles] objectATindex:searchOption]]; // Return YES to cause the search result table view to be reloaded. return YES;
}
用于文本过滤.我也尝试重新加载数据,它也没有工作.我无法弄清楚为什么在文本更改后tableview更新但在范围栏更改后它没有更新.
以上是大佬教程为你收集整理的ios搜索栏范围按钮不会更新结果tableview全部内容,希望文章能够帮你解决ios搜索栏范围按钮不会更新结果tableview所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。