Can I force a UITableView to hide the separator between empty cells?

cocoa-touch, ios, objective-c, uitableview

Solution

You can achieve what you want by defining a footer for the tableview. See this answer for more details:Eliminate Extra separators below UITableView

Problem

When using a plain-style `UITableView` with a large enough number of cells that the `UITableView` cannot display them all without scrolling, no separators appear in the empty space below the cells. If I have only a few cells the empty space below them includes separators. Is there a way that I can force a `UITableView` to remove the separators in the empty space? If not I'll have to load a custom background with a separator drawn in for each cell which will make it harder to inherit behavior. I found a somewhat similar question here, but I can't use a grouped `UITableView` in my implementation.

Original source

Related problems