Good method, originally in the Xib set custom split line position, the result is still 15 pixels, the method pro-Test. IOS8 set TableView Separatorinset Split line start from the top of the border (go)On the iOS8 [TableViewSetseparatorinset:Uiedgeinsetsmake(0,0,0,0)]; not working
The following methods have been tested to work correctly on iOS7 8
-(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:u Iedgeinsetsmake (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]; } }
/span>
For extra dashes, a horizontal line appears if you don't see the full screen.
Only need to be set to
uitableviewstylegrouped
iOS set up Split line start from top of border