Cell 其他用法
作者:
有缘人2830 | 来源:发表于
2019-05-14 16:23 被阅读0次
- 空隙
- (void)setFrame:(CGRect)frame
{
frame.size.height -= 10;
[super setFrame:frame];
}
- headview 间隔
- (CGFloat)tableView:(UITableView*)tableView heightForHeaderInSection:(NSInteger)section{
if(section == 0) {
return 20;//设置headerview与第一个cel之间的距离l
}
return 1;
}
- (void)tableView:(UITableView *)tableView willDisplayHeaderView:(UIView *)view forSection:(NSInteger)section {
if ([view isKindOfClass:[UITableViewHeaderFooterView class]]) {
((UITableViewHeaderFooterView *)view).backgroundView.backgroundColor = [UIColor clearColor];
}
}
本文标题:Cell 其他用法
本文链接:https://www.haomeiwen.com/subject/gcqeaqtx.html
网友评论