views:

31

answers:

2

I have a grouped table view; the table's background is a custom image. In one type of cell, I have just an image, and it doesn't fill up the entire cell width, and it's centered in the cell.

I've set that's cell's background to UIColor -clearColor, so that the table's background view shows through, but the cell is still drawing the light gray border (the rounded rectangle outline). I need it to NOT do that!

I've tried setting the cell's contentView's background to clear as well, and I've tried setting the table separator style to none, but still the outline draws.

Is it possible to prevent that from drawing?

A: 

Have you tried tableView.separatorColor = [UIColor clearColor]; ?

[update] If you want to have a different style for your section headers, you use a custom view by implementing:

– tableView:viewForHeaderInSection:

Manny
I thought I did, but I guess I missed it. You rock, Manny! Thanks!
randallmeadows
OK, perhaps that was pre-mature. That's what I get for coding too late at night. The problem is, this is for the entire *table*, and a different section whose cells need to look "normal" now have NO separator between them.
randallmeadows
A: 

I never figured this out, but I did use a workaround: I put the image into the footer of the section following the group of "normal" cells. In this case, there is no border, just a custom view, automatically centered in the table. Use the header would have also worked, but I liked the little bit of extra separation that the footer provided.

randallmeadows