Removing lines between UITableView cells in iOS 9

We have an app that presents a table view. We do not want any lines between cells to appear; each cell is to touch each other cell directly.


On iOS 8, we accomplished this by setting the layoutMargins for each cell to be 0 on all edges. iOS 9 appears to be ignoring the layout margins, and inserting empty lines between cells anyway. I can't see exactly what's going on, because Xcode 7.0b4's view capture feature keeps crashing when I try it. We don't want visible lines between cells; how do we turn off drawing lines between cells in iOS 9?

Answered by jsslai in 33800022

If you want to remote the table view separators, set separator style to None. But you have to set this from the code for now because there is a bug in iOS 9 and setting the separator style from the Interface Builder does not have any effect.

Accepted Answer

If you want to remote the table view separators, set separator style to None. But you have to set this from the code for now because there is a bug in iOS 9 and setting the separator style from the Interface Builder does not have any effect.

Ah, that would explain it... I had them set to None in the XIB in Xcode 6.x, and 7.0b4 is ignoring this setting. Thanks.

Removing lines between UITableView cells in iOS 9
 
 
Q