获取没有空单元格的tableView
Getting tableView without its empty cell
我需要table查看VC.view
我在 nib 中创建了 TVC。并用
实例化它
CustomTableViewController *customTableViewController = [[CustomTableViewController alloc] initWithNibName:@"CustomTableViewController" bundle:nil];
然后我想用代码
将它添加到我的自定义提醒中
alertView.contentView = customTableViewController.view;
并且有效。但是....
困难来了。
我在 table 视图中有 5 行单元格高度不同。
然后我将它添加到其他视图,我的所有高度都是 VC。
如何获得没有空白单元格或背景的 tableView?
将 BG 颜色设置为清除没有帮助
我知道问题出在这里,因为我用 nib 创建了 VC,tableView 没有设置,但是我已经将它添加到视图中 - 它的集合及其所有高度
将空视图设置为 tabview 页脚视图。它将隐藏空单元格。
self.tableView.tableFooterView = [UIView new];
我需要table查看VC.view
我在 nib 中创建了 TVC。并用
实例化它CustomTableViewController *customTableViewController = [[CustomTableViewController alloc] initWithNibName:@"CustomTableViewController" bundle:nil];
然后我想用代码
将它添加到我的自定义提醒中 alertView.contentView = customTableViewController.view;
并且有效。但是....
困难来了。
我在 table 视图中有 5 行单元格高度不同。 然后我将它添加到其他视图,我的所有高度都是 VC。
如何获得没有空白单元格或背景的 tableView? 将 BG 颜色设置为清除没有帮助
我知道问题出在这里,因为我用 nib 创建了 VC,tableView 没有设置,但是我已经将它添加到视图中 - 它的集合及其所有高度
将空视图设置为 tabview 页脚视图。它将隐藏空单元格。
self.tableView.tableFooterView = [UIView new];