- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
MomentsReportCell *cell = [MomentsReportCell getCellWith:tableView];
if (_selectedIndex == indexPath.row) {
cell.imvSelected.hidden = NO;
_beforeSelectedIndex = indexPath;
}
if (_arrDataCause.count > 0) {
cell.lblTextLeft.text = DSStringValue(_arrDataCause[indexPath.row][@"reportComment"]);
}
return cell;
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
//去除之前选中的
MomentsReportCell *beforeCell = [tableView cellForRowAtIndexPath:_beforeSelectedIndex];
beforeCell.imvSelected.hidden = YES;
//给选中的限制按钮
MomentsReportCell *cell = [tableView cellForRowAtIndexPath:indexPath];
cell.imvSelected.hidden = NO;
_selectedIndex = indexPath.row;
[_tbvMomentsReport reloadData];
}
网友评论