0

I'm having a similar problem to this question: UITableViewCell separator not showing up. However, the proposed solutions don't work for me. Specifically, I've checked the following:

  1. My UITableViewCell subclass does not override drawRect:.
  2. I don't have a custom UITableView and, therefore, I'm not overriding layoutSubviews.
  3. In Interface Builder, I have the Separator attribute of the Table View set to "Single Line".
  4. I've tried programmatically setting tableView.separatorStyle to UITableViewCellSeparatorStyleSingleLine.

But still the separator line will now show up… Does anyone know of something else that could cause this behavior or have any ideas for how I might track down what is hiding/removing the separator line?


EDIT:
Well I feel silly… In trying to create the screenshot requested by valheru, I noticed that the lines ARE there, but are almost exactly the same color as the background, so I couldn't see them until the screenshot was blown up. I had suspected earlier that the separator color might be the issue, and I tried testing for that by setting the separator color to white (my background is almost black), but it turns out that there was some copy/pasted code that was programmatically resetting the color to the almost-invisible color.

Thanks valheru for leading me to the answer. :-)

Community
  • 1
  • 1
Troy
  • 21,172
  • 20
  • 74
  • 103

1 Answers1

0

Check the height of your table view's row and the height of the cell. Make sure that the row's height is not less than the cell's height.

yoninja
  • 1,952
  • 2
  • 31
  • 39
  • Thanks for the response. The Table View's row height was set to 44 and the Cell's row heigh was set to "Default". I tried to manually set the cell height to something less than the row height, but it still doesn't make the separators appear... – Troy Jan 07 '14 at 17:54