设置tableview与顶部距离 为 0
self.automaticallyAdjustsScrollViewInsets = NO;
self.automaticallyAdjustsScrollViewInsets = NO;
去掉cell之间分割线
self.tableView
.separatorStyle
= UITableViewCellSeparatorStyleNone;
修改cell的原生图片大小
UIImage *icon = [UIImage imageNamed:@"sss"];
CGSize itemSize = CGSizeMake(30, 30);
UIGraphicsBeginImageContextWithOptions(itemSize, NO ,0.0);
CGRect imageRect = CGRectMake(0.0, 0.0, itemSize.width, itemSize.height);
[icon drawInRect:imageRect];
cell.imageView.image = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
去掉cell左侧的空白,将分割线变为与屏幕同样大小
self.separatorInset = UIEdgeInsetsZero;
self.layoutMargins = UIEdgeInsetsZero;
self.preservesSuperviewLayoutMargins = NO;