I am using iOS SDK 4.2.
In my iPad app, I am not able to change the background color of Group Table View even it does not set to clear color
If I try to change the table view style from Grouped Table View to Plain Table View and then try changing the background color then it changes.
But something seems to be wrong when I am using Grouped Table View
What could be wrong?
What should I do?
Plese Help and Suggest
Thanks.
Set nil
to the tableview's backgroundView will solve the problem.
tableView.backgroundView = nil;
BackgroundView works only with ios 3.2 and later.
So check
if([tableView respondsToSelector:@selector(backgroundView)])
tableView.backgroundView = nil;
For backward compatibility, otherwise app will crash.
I have this problem as well. Only on iPad. Only with a grouped Table.
You can fix this by creating a new view, coloring it and then setting that new view to the backgroundView of the tableView.
This works for static colors, but not Pattern Images(what I'm trying to do)
There might be some problem in linking your outlet of table.
Setting the background color is not OS dependent.
You can easily set it through
[table setBackgroundColor:[UIColor blackColor]];
Check your connections to nib file and delegate properly.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With