Reputation: 105
Is it possible to hide the separator between the cells of an UITableView? But it should configure-able for each cell seperate (so not for the whole TableView).
What I already tried out is:
UIView *backView = [[[UIView alloc] initWithFrame:CGRectZero] autorelease];
backView.backgroundColor = UIColorFromRGB(CELL_COLOR_DEFAULT);
cell.backgroundView = backView;
The only problem here is, that on the left and right side is also no border, but here I would need it.
Thanks NG
Upvotes: 2
Views: 2874
Reputation: 617
So are you trying to have a border around the entire cell or just the separator?
You could try adding something like
cell.layer.borderColor = [[UIColor blackColor]CGColor];
cell.layer.borderWidth = 10.0f;
to your cellForRowAtIndexPath method (you can decide whether to display the border for a given cell than as well).
Upvotes: 1