How to customize the background color of a TTTableViewCell? (Three20 framework)

509 Views Asked by At

I am trying to customize the background color of a TTTableViewCell with no success.

I have the following method in my TableViewController which gets executed when the user clicks on a cell :

- (void)didSelectObject:(id)object atIndexPath:(NSIndexPath*)indexPath {
TTTableViewCell* cell = (TTTableViewCell*) [self.tableView cellForRowAtIndexPath:indexPath];
cell.contentView.backgroundColor = [UIColor redColor];}

I also tried this

cell.backgroundColor = [UIColor redColor];

but still not working. Any ideas?

Edit: My fault, it is working. I was rendering something on top and I could not see it.

2

There are 2 best solutions below

0
On BEST ANSWER

Is it possible that you are rendering something on top of your cell that doesn't have [UIColor clearColor] as background color?

EDIT: Just saw your edit... So obviously... ;)

3
On

I think you want this:

cell.backgroundColor = [UIColor redColor];