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