I'm adding a UISearchBar
in the header of the GroupedTableView
, I have set the background color of the UITableView
and the View
in the interface builder to a custom color, but when running the app and scroll down the table view I got the default background color of the GroupedTableView
above the search bar
Asked
Active
Viewed 590 times
8

Mahmoud Adam
- 5,772
- 5
- 41
- 62
-
Have you checked for transparency and vibrancy effects? iOS color correction drives me crazy. – May 28 '15 at 16:59
-
try to set the tableview background color programmatically in viewDidLoad method.. – Pankaj Wadhwa May 28 '15 at 17:28
-
@pankaj i did and got the same result – Mahmoud Adam May 28 '15 at 17:31
-
try this: tableView.setValue(UIColor.red, forKey: "tableHeaderBackgroundColor") – budiDino Aug 17 '17 at 11:58
2 Answers
0
It is the background color of scroll view. Add content size to scroll view and add layouts to the search bar and table view. This should fix

Raja Reddy
- 57
- 1
-2
This is default color added to grouped style table view.
set tableView.backgroundColor
value to the color you want.

zipzapzoop
- 138
- 6