Determine system information for the current device
#define ISIOS8 ([[[Uidevice Currentdevice] systemversion] hasprefix:@ "8"])
IOS8, use the following method
-(void) Setinset: (UITableView *) View cell: (UITableViewCell *) cell
{
if (view!=nil) {
if ([View respondstoselector: @selector (setseparatorinset:)]) {
[View Setseparatorinset:uiedgeinsetszero];
}
if ([View respondstoselector: @selector (setlayoutmargins:)]) {
[View Setlayoutmargins:uiedgeinsetszero];
}
}
if (cell!=nil) {
if ([Cell respondstoselector: @selector (setseparatorinset:)]) {
[Cell Setseparatorinset:uiedgeinsetszero];
}
if ([Cell respondstoselector: @selector (setlayoutmargins:)]) {
[Cell Setlayoutmargins:uiedgeinsetszero];
}
}
}
Call the above method where you created the cell
if (isIOS8) {
[Self SetInset:self.myTableView Cell:cell];
}
return cell;
The cell underscore for the
IOS8 under TableView does not start with the 0 problem