0

This is how my unpopulated UITableView looks like:

https://www.dropbox.com/s/0jkbct6bq5ty3r8/photo%201.PNG?dl=0

And if i scroll enough this happens with the footer:

https://www.dropbox.com/s/cq4w1wcupxtad57/photo%202.PNG?dl=0

As you can see the footer is following up as i scroll down. When the tableview gets populated with more cells the amount of scrolling is obviously reduced which makes this occur more often. Is there anyway to keep it at as it looks in the first picture all the time?

the code i use for the footer looks like this:

-(UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section
{
    UIView* view = [UIView new];
    [view setBackgroundColor:[UIColor grayColor]];
    return view;
}

-(CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section
{
    return 1.0f;
}
hamzah
  • 375
  • 2
  • 5
  • 17
  • instead of using table FooterView, you can add the footer as a cell at the end like a custom cell. and in `cellForRow` method you can check the `indexPath.row` and decide wheather to show footer cell or normal cell. – Akhilrajtr Mar 25 '15 at 12:13
  • possible duplicate of [tableFooterView property doesn't fix the footer at the bottom of the table view](http://stackoverflow.com/questions/15687370/tablefooterview-property-doesnt-fix-the-footer-at-the-bottom-of-the-table-view) – atulkhatri Mar 25 '15 at 12:38

0 Answers0