整体去掉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);
}
}