Try adding section footer. Implement the tableview delegate:
-(UIView *) tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section{
return footerview2;
}
質問
In my app, I have a view in the footer of my tableview (tableview.tablefooterview) that doesn't scroll with the content.
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;
解決
Try adding section footer. Implement the tableview delegate:
-(UIView *) tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section{
return footerview2;
}
他のヒント
add this method in you view controller
- (CGFloat) tableView : (UITableView *) tableView heightForFooterInSection : ( NSInteger ) section