Question

In my app, I have a view in the footer of my tableview (tableview.tablefooterview) that doesn't scroll with the content. crappy

No matter what I do, it gets pushed down with the addition of a cell. Here is the initialization code:

  CGRect footerRect = CGRectMake(0, 0, 320, 200);
footerview2.frame = footerRect;

self.tableView.backgroundColor = self.footerview.backgroundColor;
self.tableView.tableFooterView = footerview2;
Was it helpful?

Solution

Try adding section footer. Implement the tableview delegate:

-(UIView *) tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section{
    return footerview2;
}

OTHER TIPS

add this method in you view controller

- (CGFloat) tableView : (UITableView  *) tableView heightForFooterInSection : ( NSInteger ) section
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top