I used searchbar with my UITableview. When I enter search text, the background color will be changed automatically as white color.
and also I used:
tableView.bounces=FALSE;
When I used searchbar, that time bounces also, won't work.
The output like as follows:
I need to change background color, when I searching content.
I need:
tableView.bounces=FALSE;
will work, when I searching content.
Answer for my question:
-(BOOL)searchDisplayController:(UISearchDisplayController *)controller shouldReloadTableForSearchString:(NSString *)searchString
{
UIImage *patternImage = [UIImage imageNamed:@"1.png"];
[controller.searchResultsTableView setBackgroundColor:[UIColor colorWithPatternImage: patternImage]];
controller.searchResultsTableView.bounces=FALSE;
return YES;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With