0

I was looking at the answers in this question here -

Eliminate extra separators below UITableView

Remove unwanted ios7 padding

But I cannot understand why this works -

self.tableView.tableFooterView = [[UIView alloc] initWithFrame:CGRectZero];

A footerView basically is at the end of the Table Contents if I'm correct. I also wanted a good idea of just why the separators are shown. Is it a default thing that iOS has when there is no cellForRowAtIndexPath? So it creates these default cells which are then overridden by the FooterView being present?

Community
  • 1
  • 1
gran_profaci
  • 8,087
  • 15
  • 66
  • 99

1 Answers1

0

If you have a full-elements tableview and you enable the bounce property, you still will see other cells. This is because iOS SDK prepare other cell ready to be used when you will scroll and you will access to an another part of you dataSource. Simply, the CGRectZero frame in the footer communicates that the table has a footer, so it will not probably continue. You can also create a footer not equal to the CGRectZero frame, cells will not be created anymore.

Apple Documentation

Luca D'Alberti
  • 4,749
  • 3
  • 25
  • 45