PDA

View Full Version : UITableView minus gray-striped background




Sbrocket
Apr 10, 2008, 07:16 PM
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
Apr 10, 2008, 07:28 PM
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...

mainTableView.backgroundColor = [UIColor redColor];

Sbrocket
Apr 10, 2008, 07:35 PM
Set your table view background color to what ever you want...

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
Apr 10, 2008, 07:44 PM
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

groupTableViewBackgroundColor

Duke Leto
Apr 10, 2008, 07:57 PM
Im not sure that is a color but a style of TableView.. to get the other one it would be UITableViewStylePlain. (or something)

Sbrocket
Apr 11, 2008, 01:49 AM
I'll take a look at it when I get my development machine up and running again.

Sbrocket
Apr 12, 2008, 08:25 PM
Awesome, I can't believe I missed backgroundColor before...I could have sworn I tried that.

Worked perfectly though. :o