section中header和footer悬停问题
把tableview的风格修改为UITableViewStyleGrouped。
UITableViewStylePlain默认保留header和footer的悬停。
- (UITableView *)tableView
{
if (_tableView == nil) {
_tableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStyleGrouped];
_tableView.delegate = self;
_tableView.dataSource = self;
_tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
_tableView.backgroundColor = UIColor.blueColor;
}
return _tableView;
}
tableView 底部留白问题
风格下都会存在这个问题,需要给tableview的footerview初始化一下,宽度可以为0,必须有高度值,哪怕高度值为0.01
- (UITableView *)tableView
{
if (_tableView == nil) {
_tableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewSty