3
votes

In IB, on the .xib where the file's owner is a subclass of UITableViewController, the structure of a cell that I wish to load from the xib is:

(UITableViewCell)cell->(UIView)View->(UIButton)but1,but2,but3.

I am trying to have the buttons appear on the table without the frame/background of the cell.

I've made the cell's background and its View's background clearColor, but what I get now is a black background on the cell (with the rounded corners), like so:

alt text

Because of the striped nature of the tableview's background, if I choose that same background for the cell then the stripes won't align perfectly, so it is not acceptable. I just need the damn cell to be translucent, I don't know where the black is coming from.

Any ideas?

1

1 Answers

10
votes

Got it. Thought I'd post it if anybody else is in the same plight:

UIView *backView = [[UIView alloc] initWithFrame:CGRectZero];
backView.backgroundColor = [UIColor clearColor];
cell.backgroundView = backView;
[backView release];

Now it looks like this:

alt text