Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Sbrocket

macrumors 65816
Original poster
Jun 3, 2007
1,250
0
/dev/null
Does anyone know how to implement a UITableView...but without the nasty grey-striped background view? I'm sure it looks nice in other apps but it really, REALLY doesn't match my UI design so far. A UITableView would be perfect for what I'm trying to do, though.

Just to clarify, it would be a grouped UITableView (UITableViewStyleGrouped, not Plain)...I just want to get rid of the gray background and have it float where it normally would be but with transparency instead of gray stripeys.

Any ideas (if you can tell what I'm saying here)? :p
 

iphoneGuy

macrumors member
Does anyone know how to implement a UITableView...but without the nasty grey-striped background view? I'm sure it looks nice in other apps but it really, REALLY doesn't match my UI design so far. A UITableView would be perfect for what I'm trying to do, though.

Just to clarify, it would be a grouped UITableView (UITableViewStyleGrouped, not Plain)...I just want to get rid of the gray background and have it float where it normally would be but with transparency instead of gray stripeys.

Any ideas (if you can tell what I'm saying here)? :p

Set your table view background color to what ever you want...

Code:
    mainTableView.backgroundColor = [UIColor redColor];
 

Sbrocket

macrumors 65816
Original poster
Jun 3, 2007
1,250
0
/dev/null
Set your table view background color to what ever you want...

Code:
    mainTableView.backgroundColor = [UIColor redColor];

My MBP's logic board is shot right now so I can't test anything, but I do believe I tried that along with the other obvious options (UITableViewCell.backgroundView among them) and it didn't seem to do much. UITableView.backgroundColor wouldn't make much sense unless there's a [UIColor greyStripedColor]. :p
 

iphoneGuy

macrumors member
My MBP's logic board is shot right now so I can't test anything, but I do believe I tried that along with the other obvious options (UITableViewCell.backgroundView among them) and it didn't seem to do much. UITableView.backgroundColor wouldn't make much sense unless there's a [UIColor greyStripedColor]. :p

It does work, I just did it and there is a color for the grey

Code:
groupTableViewBackgroundColor
 

Duke Leto

macrumors regular
Mar 17, 2008
166
0
Im not sure that is a color but a style of TableView.. to get the other one it would be UITableViewStylePlain. (or something)
 

Sbrocket

macrumors 65816
Original poster
Jun 3, 2007
1,250
0
/dev/null
Awesome, I can't believe I missed backgroundColor before...I could have sworn I tried that.

Worked perfectly though. :eek:
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.