iOS7情况下: tableView.separatorInset = UIEdgeInsetsZero; iOS8、9情况下: 首先在viewDidLoad方法中加上如下代码: if ([tableView respondsToSelector:@selector(setSeparatorInset:)]) { [tableView setSeparatorInset: UIEdgeInsetsZero]; } if ([tableView respondsToSelector:@selector(setLayoutMargins:)]) { [tableView setLayoutMargins: UIEdgeInsetsZero]; } 然后再加上这个方法: - (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]; } }