views:

1102

answers:

7

When creating a custom UITableViewCell I notice that it looks as expected in 'plain' style but that the corners of the cells are not rounded if the table view is displayed in 'grouped' style: i.e. the corners are square.

I have searched but cannot find any real explanation of why this happens and, more importantly, how to remedy this effect.

A: 

I do not have this issue. Just to be clear, only the first and last cell in a section have rounded corners (on the top and bottom, respectively).

Are you loading the cell from a nib? Is the object in the nib a UITableViewCell or subclass of that?

Also, I recommend changing the width to 300 for a cell that will be part of a grouped table view.

gerry3
+1  A: 

Make sure that you set the UITableViewStyle before the table view fetches and presents data (e.g. UITableViewCells) for the first time.

MrMage
A: 

I have same problem.

I have added a Custom Cell in header view of table. I want to make Something same like in iPhone Contact Application, When you Click Edit or + button.

Custom cell added Successfully but it Shows in Rectangle, rather than in form of Round Rect Shape.

So need your help. Please Let me know the Solution.

Looking forwards.

Thank YOu,

Arun Thakkar.

Arun Thakkar
A: 

I to have the same problem. A square UITableViewCell when placed on table view header??

DAVID HALL
A: 

As stated above make sure you declare the UITableVieStyle as grouped when you initiate it. E.g initWithStyle:UITableViewStyleGrouped.

Seb Kade

Seb Kade
A: 

set .layer.circleRadius = 10

it will solve ur prob

Jaya
A: 

i ran in to the same sort of thing. i tried resizing my custom cell, nothing worked. then i set the background color of the view in the custom cell nib to "Clear" and it looks better for me.

david