开发者

UITableViewCell clear separator

开发者 https://www.devze.com 2023-01-20 13:19 出处:网络
I did like following tableview.s开发者_运维知识库eparatorStyle = UITableViewCellSeparatorStyleNone;

I did like following

tableview.s开发者_运维知识库eparatorStyle = UITableViewCellSeparatorStyleNone;

However, when I add new row , separator will appear like following picture.

UITableViewCell clear separator

How to remove separator in UITableViewCell ?


I got it

UIView *backView = [[UIView alloc] initWithFrame:CGRectZero];
backView.backgroundColor = [UIColor clearColor];
tableview.backgroundView = backView;
[backView release];


Just posting because i found other way.

I used UITableView.separatorColor property and set color same as background color of cell.

It will make it easier for those who are using default cell properties

0

精彩评论

暂无评论...
验证码 换一张
取 消