方法1: tableview.separatorStyle = UITableViewCellSeparatorStyleNone;然后自定义cell的分割线 方法2: 设置cell的separatorInset cell.separatorInset = UIEdgeInsetsMake(0, 0, 0, MAXFLOAT);不显示
当分组情况下,去除分组间的线
设置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); } }
新闻热点
疑难解答