1. Set TableView directly to Self.tableView.separatorStyle = Uitableviewcellseparatorstylenone. Then customize the cell where you add a view, the height is 1, the color set itself.
2. Add these two methods
-(void) viewdidlayoutsubviews
{
if ([Self.tableview respondstoselector: @selector (setseparatorinset:)]) {
[Self.tableview Setseparatorinset:uiedgeinsetsmake (0,0,0,0)];
}
if ([Self.tableview respondstoselector: @selector (setlayoutmargins:)]) {
[Self.tableview Setlayoutmargins:uiedgeinsetsmake (0,0,0,0)];
}
}
-(void) TableView: (UITableView *) TableView Willdisplaycell: (UITableViewCell *) cell Forrowatindexpath: (Nsindexpath *) Indexpath
{
if ([Cell respondstoselector: @selector (setseparatorinset:)]) {
[Cell Setseparatorinset:uiedgeinsetszero];
}
if ([Cell respondstoselector: @selector (setlayoutmargins:)]) {
[Cell Setlayoutmargins:uiedgeinsetszero];
}
}
IOS solve TableView Split line starting from the top of the border