ios - tabbarcontroller 中的表格视图滚动问题
问题描述
我正在使用 tabbarcontroller,并且在导航控制器中嵌入了 tabbarcontroller 的 childcontoller。我在 childcontroller 中使用滚动视图,底部是我的 tableview。滚动到底部,数组中有 5 个元素的 tableview 仅显示 2 个元素。
我已经尝试过这段代码来管理滚动视图中表格视图的高度
- (void)viewDidLoad
{
[超级视图DidLoad];
int height =_PreviousComplaintArray.count*77;
_tableView.frame=CGRectMake(_tableView.frame.origin.x, _tableView.frame.origin.y,
_tableView.frame.size.width,height);
[_tableView 重载数据];
}
-(void)viewDidLayoutSubviews
{
[self.tableView layoutIfNeeded];
self.tblhght.constant = self.tableView.contentSize.height+50;
NSLog(@"size is %d",self.tblhght.constant);
}
解决方案
推荐阅读
- android - Android 图像文件不显示
- mongodb - 如何将 $ne 应用于数组内的文档字段?
- bash - 扫描未知 IP 地址并打印出来的 Bash 脚本
- python - Google Drive Oauth Request for Permission 按钮被禁用
- java - 如何在android studio中使用BASE64解压图像
- python - 更新时的 Conda 错误:`conda.core.link:_execute(637):安装包“无”时出错。断言错误()`
- search - FindAll函数返回(范围,范围,范围,范围)时如何获取a1Notations?
- r - dplyr 解决方案来制表长数据文件
- android - 给定borderRadius时如何设置标签栏的背景颜色?
- .net - 在执行某些操作之前不会接收到串行端口事件