UITableView separator lines disappear between cells on scroll

jtrim picture jtrim · Oct 8, 2009 · Viewed 10.2k times · Source

Problem: The separator between cells in a table view appear only for those cells shown when the view loads, and only at load time. When the tableview is scrolled down, the cells scrolled into view show no separator between them, then when the tableview is scrolled back up, the initial cells show no separator.

Details: I've got a UITableView to which I'm adding standard UITableViewCells. These cells are created with initWithFrame, frame height = 90px. I'm adding a custom view created from a nib to this cell's view, height = 90px. The cell height is specified at 90px in tableView:heightForRowAtIndexPath:.

Has anyone experienced this behavior?

Answer

jtrim picture jtrim · Oct 8, 2009

I had a feeling the solution to this would be simple... I made the height of my cells 91px and the separator lines appear as they should on scroll.