整体去掉cell的线
tableView.separatorStyle = UITableViewCellSelectionStyleNone;
去掉tableview多余的cell线
tableview行数比较少的情况,会导致空的地方也还是会有cell线
tableView.tableFooterView = [[UIView alloc] initWithFrame:CGRectZero];
去掉特定的cell线
根据需求去掉某些行的线
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
//第0行的cell线去掉
if(indexPath.row == 0){
cell.separatorInset = UIEdgeInsetsMake(0,SCREEN_WIDTH, 0, 0);
}
}

本文介绍如何在iOS应用中使用Swift编程语言去除TableView中的Cell线。包括整体移除线样式、针对空余部分的处理以及特定Cell行线的移除方法。
1167

被折叠的 条评论
为什么被折叠?



