Ableview is a commonly used control in app development and is powerful for data display. Here are two ways to set up a full screen divider for UITableView.
The specific details are as follows:
Add the following code as shown
Stableview.separatorinset = Uiedgeinsetszero;
Stableview.layoutmargins = Uiedgeinsetszero;
Cell.layoutmargins = Uiedgeinsetszero;
The second method is shown below
-(void) viewdidlayoutsubviews
{
[super viewdidlayoutsubviews];
if ([_moretableview respondstoselector: @selector (setseparatorinset:)]) {
[_moretableview setseparatorinset: Uiedgeinsetsmake (0,0,0,0)];
}
if ([_moretableview respondstoselector: @selector (setlayoutmargins:)]) {
[_moretableview 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];
}
}