Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/116.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios TableView页脚不随内容滚动_Ios_Uitableview_Uikit - Fatal编程技术网

Ios TableView页脚不随内容滚动

Ios TableView页脚不随内容滚动,ios,uitableview,uikit,Ios,Uitableview,Uikit,在我的应用程序中,我的tableview(tableview.tablefooterview)的页脚中有一个视图,它不随内容滚动 无论我做什么,它都会随着一个单元格的加入而被压下。 以下是初始化代码: CGRect footerRect = CGRectMake(0, 0, 320, 200); footerview2.frame = footerRect; self.tableView.backgroundColor = self.footerview.backgroundColor;

在我的应用程序中,我的tableview(tableview.tablefooterview)的页脚中有一个视图,它不随内容滚动

无论我做什么,它都会随着一个单元格的加入而被压下。 以下是初始化代码:

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

self.tableView.backgroundColor = self.footerview.backgroundColor;
self.tableView.tableFooterView = footerview2;

尝试添加节页脚。实现tableview委托:

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

尝试添加节页脚。实现tableview委托:

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

在视图控制器中添加此方法

- (CGFloat) tableView : (UITableView  *) tableView heightForFooterInSection : ( NSInteger ) section

在视图控制器中添加此方法

- (CGFloat) tableView : (UITableView  *) tableView heightForFooterInSection : ( NSInteger ) section

表视图中有多少节?表视图中有多少节?