UITableview background color when using Search Bar
iphone
Solution
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;
}
Problem
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.