Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IOS 7: Removing border from a section of grouped-style UITableView

After I moved to iOS 7 / xcode 5, the hidden border of the sections appeared although I handled this case for iOS 6 and it worked for me.

In my code I'm using this to make the section border hidden, which works on iOS 6 but not on iOS 7:

cell.backgroundView =[[UIView alloc] initWithFrame:CGRectZero];

I tried all answers in this question and this one but no answer worked for me.

Please advice.

like image 653
Sawsan Avatar asked Sep 30 '13 07:09

Sawsan


1 Answers

It seems that the separator between cells in a single section is the same as the border for the sections in IOS7. I solved my problem by setting the separator attribute of my table in Interface Builder to None and drawing the separator lines manually for the sections that have more than one cell.

like image 123
Sawsan Avatar answered Oct 19 '22 22:10

Sawsan