0

UITableViewCell with cell.backgroundView , and self.webSiteTableView.separatorStyle = UITableViewCellSeparatorStyleNone , when i get into editingStyle , the line appeared under the DELETE button with red background . no line between cells , only part of it showed under the button when i get in to editingstyle ..

i tried almost everything:

[self.webSiteTableView setSeparatorInset:UIEdgeInsetsMake(0, 0, 0, 0)];
self.webSiteTableView.separatorStyle = UITableViewCellSeparatorStyleNone;
[[UITableView appearance]setSeparatorInset:UIEdgeInsetsZero];
self.webSiteTableView.backgroundColor = [UIColor clearColor];

cell.contentView.backgroundColor = [UIColor clearColor];
cell.backgroundColor = [UIColor clearColor];
[cell setBackgroundColor:[UIColor clearColor]];

it just didn't work ... the line still there ... is there any way to make it disappear ? thx !

UPDATE: i tried self.webSiteTableView.backgroundColor = [UIColor redColor]; turn out separator line did disappear .. the problem is the height of the DELETE button smaller than height of the cell ... how can i fix it ? how can i make button bigger ? ..

jack_zp
  • 1
  • 5
  • You can add your custom separator like this http://stackoverflow.com/a/21249030/1294448 – Bishal Ghimire Feb 18 '14 at 07:19
  • `[[UITableView appearance]setSeparatorInset:UIEdgeInsetsZero];` what is the use of this code when you are not using separator. – Hemant Singh Rathore Feb 18 '14 at 07:23
  • i tried self.webSiteTableView.backgroundColor = [UIColor redColor]; turn out separator line did disappear .. the problem is the height of the DELETE button smaller than height of the cell ... how can i fix it ? how can i make button bigger ? .. – jack_zp Feb 18 '14 at 07:36

2 Answers2

1

Swap the order of the two statements. Set the color first, then the inset:

self.tableView.separatorColor = [UIColor clearColor];
self.tableView.separatorInset = UIEdgeInsetsZero;
Sandeep Agrawal
  • 425
  • 3
  • 10
  • i tried self.webSiteTableView.backgroundColor = [UIColor redColor]; turn out separator line did disappear .. the problem is the height of the DELETE button smaller than height of the cell ... how can i fix it ? how can i make button bigger ? .. – jack_zp Feb 18 '14 at 07:35
0

I was have the same issue, trying to hide the separator. I used delegate methods as below for the resolving it.

- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section {
    // This will create a "invisible" footer
    return 0.01f;
}
- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section
{
    return [UIView new];

    // If you are not using ARC:
    // return [[UIView new] autorelease];
}
Ravi_Parmar
  • 12,319
  • 3
  • 25
  • 36
  • i tried self.webSiteTableView.backgroundColor = [UIColor redColor]; turn out separator line did disappear .. the problem is the height of the DELETE button smaller than height of the cell ... how can i fix it ? how can i make button bigger ? .. – jack_zp Feb 18 '14 at 07:36
  • Yes, you can do that. You could easily find it if you have searched. ny ways, pls go through this link it will somewhat help you : http://stackoverflow.com/questions/19281834/ios-7-uitableviewcontroller-changing-replacing-delete-button – Ravi_Parmar Feb 18 '14 at 07:41