Possible Duplicate:
Change background of a grouped UITableView
I am not able to change the background color of UITableView if it is UITableViewStyleGrouped
.
My code :
[addressNewTbl setBackgroundColor:[UIColor redColor]];
Help!
Possible Duplicate:
Change background of a grouped UITableView
I am not able to change the background color of UITableView if it is UITableViewStyleGrouped
.
My code :
[addressNewTbl setBackgroundColor:[UIColor redColor]];
Help!
You might need to add some code. Try -
[UITableView setBackgroundView: nil];
or you can also do :
UIView* bview = [[UIView alloc] init];
bview.backgroundColor = [UIColor yellowColor];
[tableView setBackgroundView:bview];
Both will work..
Did you try
addressNewTbl.backgroundView = nil;
[addressNewTbl setBackgroundColor:[UIColor redColor]];
You additionally need to disable the background view:
[addressNewTbl setBackgroundView:nil];
Instead of setting the background color of the entire UITableView
, try what happens when you set its backgroundView
's background color.
in cellForRowAtIndexPath datasource method.try setting
[cell setBackgroundColor:[UIcolor redColor]];