Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Removing the line separator but not the border in a UITableView

I want to remove the line separator in a grouped table view cell, but not the border of the table. I used this code to remove the separator but it removes the border also:

profileTable.separatorColor:[UIColor clearColor];

The screen shot explains what I need.

Is there any code available to remove it?

 Screen shot

like image 766
New Xcoder Avatar asked Apr 27 '12 09:04

New Xcoder


2 Answers

Following code may be help to you.

profileTable.separatorStyle = UITableViewCellSeparatorStyleNone;
like image 116
Nimit Parekh Avatar answered Oct 15 '22 13:10

Nimit Parekh


One solution to your problem, could be to create a custom layout for your grouped tableview. So you would create a top, middle and bottom part of the cells, and then add a border only to the sides.

I used this tutorial: http://cocoawithlove.com/2009/04/easy-custom-uitableview-drawing.html

like image 2
Krueger Avatar answered Oct 15 '22 11:10

Krueger