PS: This method is only valid for iOS8
1, in -(void) called in the Viewdidload method
[Self setupcellseparatorinset];
2, in the current controller, the following two methods are implemented:
Set the cell's split line to the left margin of 0
-(void) Setupcellseparatorinset
{
if ([Self.tableview respondstoselector: @selector (setseparatorinset:)]) {
[Self.tableview Setseparatorinset:uiedgeinsetszero];
}
if ([Self.tableview respondstoselector: @selector (setlayoutmargins:)]) {
[Self.tableview Setlayoutmargins:uiedgeinsetszero];
}
}
-(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 development----Remove the left gap of the Tableviewcell split line and fill the split line