Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS 8 setting setSeparatorInset to Zero

I am trying to set my TableView Cell inset to UIEdgeInsetsZero but it has zero effect on my table view.

I am getting this issue with new iOS 8 Betas. Beta 5 seems to have this issue as well. Is this a legit issue, or am I doing something wrong?

 self.tableView.separatorInset = UIEdgeInsetsZero
like image 763
warrantsuspect Avatar asked Aug 04 '14 21:08

warrantsuspect


1 Answers

This seems to be an issue in the iOS8 betas:

Workaround:
Set the layoutMargins property of the cells and the UITableView to UIEdgeInsetsZero.

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {

    [...]

    cell.layoutMargins = UIEdgeInsetsZero;

    return cell;
}

- (void) viewDidLayoutSubviews {

    [super viewDidLayoutSubviews];

    [...]

    self.myTableView.layoutMargins = UIEdgeInsetsZero;
}
like image 191
Volker Voecking Avatar answered Oct 11 '22 10:10

Volker Voecking