1. 设置tableview属性:
[_tableView setLayoutMargins:UIEdgeInsetsZero];
[_tableView setSeparatorInset:UIEdgeInsetsZero];
2. tableview代理方法:
- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath
{
[cell setLayoutMargins:UIEdgeInsetsZero];
[cell setSeparatorInset:UIEdgeInsetsZero];
}