2012-12-01 53 views
0

可能重复:
How to change UITableViewCell appearance if cellForRowAtIndexPath is not calling我可以更改UISearchDisplayController的searchResultsTable UITableViewCell的外观时,不显示任何结果

我有搜索显示控制器在我的应用程序表视图。表视图单元格具有由图案图像创建的自定义背景颜色。问题是当我开始搜索并且没有结果时,自动创建表格视图单元(没有调用cellForRowAtIndexPath :),所以我无法改变它们的外观。但我希望我所有的表格视图单元格具有相同的背景颜色。那么,我怎么能做到这一点?

+0

你为什么要复制你刚才的问题吗? – rmaddy

回答

1

你可以这样做在viewDidLoad中()
self.searchDisplayController.searchResultsTableView.backgroundColor = [UIColor redColor]; // set your color for tableview here

相关问题