问题描述:

I'm customizing a Tableview ..

I want to hide the top seperator line separating on the first cell. Any ideas how to do this?

网友答案:

Configure TableView with no Separators, and then add custom image at the bottom of every cell which will look same as separator, so you can achieve this functionality.

网友答案:

UITableView has

@property(nonatomic) UITableViewCellSeparatorStyle separatorStyle;
@property(nonatomic,retain) UIColor               *separatorColor; 

So try this

tableView.separatorStyle = UITableViewCellSeparatorStyleNone;

or

tableView.separatorColor = [UIColor clearColor];

And after that you should customize all of your cells with your own separators. Simply add view with autoresizing mask flexible top margin and flexible width Don't forget to add it to cell.contentView Actual color of separator is [UIColor grayColor];

相关阅读:
Top