您的位置:首页 > 移动开发 > IOS开发

ios tableview去除指定cell分割线

2017-02-07 11:54 363 查看
方法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);

}

}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息