How do I show empty separator lines in UITableView in iOS 15?

Prior to iOS 15, UITableView would continue to show the separator lines for any empty space below the last visible row on the first page size. (see attachment 1)

iOS 15 seems to have changed that behavior (see attachment 2).

This no longer works programmatically, i.e. using:

self.tableView.separatorColor = [UIColor lightGrayColor];
self.tableView.separatorStyle = UITableViewCellSeparatorStyleSingleLine;

Nor does it work in Interface Builder.

How can I revert to the earlier behavior?

Accepted Reply

These extra separators are drawn between empty rows named "filler rows", and in iOS 15 they are disabled by default as part of the new design for plain-style table views.

However, in iOS 15 there's a new property on UITableView called fillerRowHeight (documentation), which allows you to re-enable them for plain-style table views if desired, and even control the height of the filler rows (adjust the spacing between these extra separators).

  • Works perfectly. How can I set that property on a table view in my launch screen?

Add a Comment

Replies

These extra separators are drawn between empty rows named "filler rows", and in iOS 15 they are disabled by default as part of the new design for plain-style table views.

However, in iOS 15 there's a new property on UITableView called fillerRowHeight (documentation), which allows you to re-enable them for plain-style table views if desired, and even control the height of the filler rows (adjust the spacing between these extra separators).

  • Works perfectly. How can I set that property on a table view in my launch screen?

Add a Comment