Katedral Pillon
Katedral Pillon

Reputation: 14864

setting UITableView separator inset to zero is not working

I define my table entirely in code. I want to remove the padding in the separator but my trials are not working

  [tableView setSeparatorInset:UIEdgeInsetsZero]

and

  [tableView setSeparatorInset:UIEdgeInsetsMake(0, 0, 0, 0)];

Upvotes: 0

Views: 535

Answers (3)

MaappeaL
MaappeaL

Reputation: 524

You can adjust the left margin/padding by setting the frame's x margin into negative.

MyTableView = [[UITableView alloc] initWithFrame:CGRectMake(-5, 108, 325, 500);

Upvotes: 1

Anbu.Karthik
Anbu.Karthik

Reputation: 82766

try this

[tableView setSeparatorInset:UIEdgeInsetsMake(0, 10, 0, 10)];

Upvotes: 1

user821127
user821127

Reputation:

You want to remove separator? If yes then instead of applying inset use Table view property

[self.tblResults setSeparatorStyle:UITableViewCellSeparatorStyleNone];

Upvotes: 0

Related Questions