Skip to content

Instantly share code, notes, and snippets.

@psobko
Created October 21, 2013 17:04
Show Gist options
  • Save psobko/7087265 to your computer and use it in GitHub Desktop.
Save psobko/7087265 to your computer and use it in GitHub Desktop.
UITableViewCell Seperator
//Remove seperator insets on iOS7
[self.tableView setSeparatorInset:UIEdgeInsetsZero];
//Set a custom cell seperator
self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
...
cell.frame = CGRectMake(0, 0, 320, 200);
UIView* separatorLineView = [[UIView alloc] initWithFrame:CGRectMake(0, 200, 320, 10)];
separatorLineView.backgroundColor = [UIColor whiteColor];
[cell.contentView addSubview:separatorLineView];
...
}
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
return 210.0f;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment