ios tableview去除指定cell分割线

来源:互联网 发布:电脑版淘宝 编辑:程序博客网 时间:2024/04/30 05:59

方法1: tableview.separatorStyle = UITableViewCellSeparatorStyleNone;然后自定义cell的分割线
方法2: 设置cell的separatorInset cell.separatorInset = UIEdgeInsetsMake(0, MAXFLOAT, 0,0);不显示

当分组情况下,去除分组间的线

设置tableview的style为UITableViewStylePlain

去除头部黏合

- (void)scrollViewDidScroll:(UIScrollView *)scrollView {
CGFloat sectionHeaderHeight = 10;
if (scrollView.contentOffset.y<=sectionHeaderHeight&&scrollView.contentOffset.y>=0) {
scrollView.contentInset = UIEdgeInsetsMake(-scrollView.contentOffset.y, 0, 0, 0);
} else if (scrollView.contentOffset.y>=sectionHeaderHeight) {
scrollView.contentInset = UIEdgeInsetsMake(-sectionHeaderHeight, 0, 0, 0);
}
}

0 0