- (void) tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath{
? ? ? ? ?//設(shè)置某個cell沒有separator
? ? ? ? ?if (indexPath.row == self.itemArray.count - 1) {
? ? ? ? ? ? ? ? ? ? cell.separatorInset = UIEdgeInsetsMake(0, 0, 0, cell.bounds.size.width);
? ? ? ? ? ? ? ? ? ? if ([cell respondsToSelector:@selector(setLayoutMargins:)]) {
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?cell.layoutMargins = UIEdgeInsetsMake(0, 0, 0, cell.bounds.size.width);
? ? ? ? ? ? ? ? ? ? ?}
? ? ? ? ? ? ? ? ? ? ? //這句不寫柒巫,會出現(xiàn)一小塊雕拼,你自己試吧
? ? ? ? ? ? ? ? ? ? ?if ([cell respondsToSelector:@selector(setPreservesSuperviewLayoutMargins:)]) {
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? [cell setPreservesSuperviewLayoutMargins:NO];
? ? ? ? ? ? ? ? ? ? ?}
? ? ? ? ?}
}