Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UITableView: enable separator only in a specified section

How can I enable separator only in a specified section?

like image 278
Artem Oboturov Avatar asked Oct 25 '11 17:10

Artem Oboturov


1 Answers

Well, if you are using custom cells, you can turn off separatorStyle on the tableview and add an extra view of height 1 with a light gray background at the bottom of your custom cell's contentView, either add it in your Nib/Storyboard's Prototype Cell or programmatically add it in the cells initialization code.

This would be much cleaner than adding another table in front of the 1st table as suggested in the other answer.

like image 126
CodeBrew Avatar answered Nov 15 '22 04:11

CodeBrew