UISearchbar
視圖有一個默認灰色區域。向下滾動時,我們可以看到灰色區域。我需要爲灰色區域設置backgroundColor
。設置搜索欄範圍的背景顏色
我已經加入到UISearchBar
頭UITableView
。並且在UITableView
中有刷新控制。現在的問題是,當我拉下刷新控件時,看起來很奇怪。因爲刷新控制發生背景表視圖(白色)的和搜索視圖採用默認backgroundColor
(灰色)。
如果我爲UISearchbar
設置backgroundColor
它只適用於UISearchBar
而不是UISearchBar
的範圍。有了這個結果,我正在考慮灰色區域是否屬於哪個視圖。我相信沒有額外的觀點。我已將顏色設置爲tableview
,refresh view
,UISearchBar
和self.view
,但注意適用於灰色區域。
謝謝,
[SearchItem setBackgroundColor:的UIColor redColor]]; –
@KiritModi,正如我所提到的,如果我爲搜索欄設置背景,它僅適用於視圖範圍。 – selva
@All,下面的行解決了我的問題,但不知道如何:) [tableview setBackgroundView:[UIImageView new]]; – selva