解决方案 »

  1.   

    可以清除cell内容,如下:
    -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
    {
        static NSString *cellIdentifier=@"order_cell";
        _cell = (OrderCell *)[tableView dequeueReusableCellWithIdentifier:cellIdentifier];
        
        if(_cell==nil)
        {
            _cell=[[OrderCell alloc]initWithStyle: UITableViewCellStyleDefault reuseIdentifier:cellIdentifier];    }else
        {
            while ([_cell.contentView.subviews lastObject]!=nil) {
                [(UIView *)[_cell.contentView.subviews lastObject] removeFromSuperview];
            }
        }
        
        [_cell updateCell:[_orderArray objectAtIndex:indexPath.section] withRow:indexPath.section];
        //_pn(indexPath.section);
        _cell.delegate=self;
        _cell.selectionStyle = UITableViewCellSelectionStyleNone;
        _cell.backgroundColor = [UIColor whiteColor];
        
        return _cell;
    }
      

  2.   

    我的建议是在cell中扩展出一个属性如isSelected , 点击时更改这个属性的状态。在cell 生成时,也可根据这个状态来判断uilabel的显示颜色。