Reputation: 79
I set my static
tableView
's separator to none
, can I set my separator
in my cell all alone?
In the storyboar I set separator
to none
This is the result of set separator
to none
, How can I add line under the cell?
If I set separator to Single Line
, there is double line above the red button
Upvotes: 0
Views: 104
Reputation: 542
You can set separator to none.Then draw a line in the cell which need a line.
UIView *lineView = [[UIView alloc] initWithFrame:CGRectMake(0, cellHeight - 1 / [UIScreen mainScreen].scale, [UIScreen mainScreen].bounds.size.width, 1 / [UIScreen mainScreen].scale)];
// (1 / [UIScreen mainScreen].scale) : 1px width line.
lineView.backgroundColor = [UIColor blackColor];
[self addSubview:lineView];
Upvotes: 1