Pregunta

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;
¿Fue útil?

Solución

Try adding section footer. Implement the tableview delegate:

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

Otros consejos

add this method in you view controller

- (CGFloat) tableView : (UITableView  *) tableView heightForFooterInSection : ( NSInteger ) section
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top