Discussion in 'iOS Development' started by gojohnnyboi, Jul 29, 2008.
How do i set a UITableCell's color from white?
UIView has a setBackgroundColor method which receives a CGColorRef, and since UITableCell is an UIView's subclass, it should work as well.
You might want to look for its UIColor equivalent if you're on 2.0
Yeah, i patched the SDK headers for iphone-gcc use, and i tried setBackgroundColor and setColor on the cell, but they didn't seem to work. Also, CGColorRef doesn't work anymore. Maybe i did it wrong.
EDIT: No, I just dont think it works for UIImageAndTextTableCell
[ cell setBackgroundColor: [ UIColor grayColor ] ];
Separate names with a comma.