2012-12-01 54 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

相關問題