我有一个带有自定义单元格的表格 View 。我想要的是在表格 View 的底部有一个页脚(如“加载”指示器)。我正在使用此代码添加页脚:
- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section {
UIActivityIndicatorView *spinner = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray];
[spinner startAnimating];
spinner.frame = CGRectMake(0, 0, 320, 44);
return spinner;
}
但这会使页脚“漂浮”在表格 View 的底部并与表格底部重叠:
如何强制页脚仅在表格的最后一个单元格下方可见?像这样:
谢谢!
最佳答案
我认为您应该设置 tableFooterView 而不是设置节页脚 View 。
关于ios - 强制页脚留在表格 View 中的最后一个单元格下方,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30685238/