In the development of iOS8, you will find that the system comes with 15 pixels in front of the split line, then how to be like before, I see someone else's blog has mentioned
First set up your system split line in the Viewdidload, and then add the following code
Listview=[[uitableview Alloc] Initwithframe:cgrectmake (0, 0, Self.contentView.frame.size.width, self.contentView.frame.size.height) Style:uitableviewstyleplain];
listview.delegate=self;
listview.datasource=self;
Listview.backgroundcolor=uicolorfromrgb (239, 239, 239);
Listview.separatorstyle=uitableviewcellseparatorstylesingleline;
Set the split line interval to zero
if ([ListView respondstoselector: @selector (setseparatorinset:)]) {
[ListView Setseparatorinset:uiedgeinsetszero];
}
if ([ListView respondstoselector: @selector (setlayoutmargins:)]) {
[ListView Setlayoutmargins:uiedgeinsetszero];
}
[Self.contentview AddSubview:self.listView];
[Self setextracelllinehidden:listview];
Then write the following code in the proxy method of TableView.
-(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 set TableView split line