views:

96

answers:

2

For group table cell, I fall into this problem.

cell.backgroundColor=[UIColor clearColor]

make the cell bg black. It works for normal cell, not for group table cell. I want to add some button, e.g. like the detail view of iPhone contact with transparent background.

A: 

From the looks of it I'd say you are setting a background image to your cell. You can see it at each cell on the right side, there are the stripes from your view background. Remove the cell's background and you should be fine.

Morothar
A: 

If anybody face the problem, I got a solution, set a transparent view as a background view of the cell. Then it becomes totally transparent. Then you can add more view or customize the cell.

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

            messageCell.contentView.layer.cornerRadius = 10.0;
            messageCell.contentView.layer.borderWidth = 1.0f;
            messageCell.contentView.layer.borderColor = [[Settings getInstance] colorFrameBorder].CGColor;
            messageCell.selectionStyle = UITableViewCellSelectionStyleNone;
            return messageCell;

This solution was quoted in one of the StackOverflow question, which I cant remember. I have also found that, its easy to add a transparent view in the table header or footer. The button down the contact details are probably added in a footer view.

karim